Skip to content

Commit

Permalink
Configure GitHub IDP
Browse files Browse the repository at this point in the history
This commit adds a GitHub identity provider, and disables the
self-provisioner role for all counts. Currently, GitHub auth access is
limited to the ocp-on-nerc/nerc-ops group.
  • Loading branch information
larsks committed Jun 18, 2022
1 parent 8c957e2 commit b603b61
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- oauth.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
annotations:
include.release.openshift.io/ibm-cloud-managed: "true"
include.release.openshift.io/self-managed-high-availability: "true"
include.release.openshift.io/single-node-developer: "true"
release.openshift.io/create-only: "true"
name: cluster
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "false"
name: self-provisioners
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: self-provisioner
subjects: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- clusterrolebinding.yaml
2 changes: 2 additions & 0 deletions cluster-scope/overlays/common/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ resources:
- machineconfigs/99-master-ssh.yaml
- machineconfigs/99-worker-ssh.yaml
- ../../base/operators.coreos.com/subscriptions/external-secrets-operator
- ../../base/config.openshift.io/oauths/cluster
- ../../base/rbac.authorization.k8s.io/clusterrolebindings/self-provisioners
3 changes: 3 additions & 0 deletions cluster-scope/overlays/nerc-ocp-infra/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ resources:
- ../../bundles/acm
- ../../base/operators.coreos.com/subscriptions/cert-manager
- clusterversion.yaml

patches:
- path: oauths/cluster_patch.yaml
15 changes: 15 additions & 0 deletions cluster-scope/overlays/nerc-ocp-infra/oauths/cluster_patch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: config.openshift.io/v1
kind: OAuth
metadata:
name: cluster
spec:
identityProviders:
- name: github
mappingMethod: claim
type: GitHub
github:
clientID: 77915cd4cdb5c4df7723
clientSecret:
name: github-client-secret
teams:
- ocp-on-nerc/nerc-ops

0 comments on commit b603b61

Please sign in to comment.