forked from OCP-on-NERC/nerc-ocp-config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure RBAC for cluster admin access
Grant members of the `cluster-admins` group both `cluster-reader` and `sudoer` access. This permits members of this group to see most cluster resources, and to impersonate other users, including the `system:admin` user for full cluster-admin access. From the command line, you can use the `--as` option to impersonate the admin user: oc --as system:admin create ns example
- Loading branch information
Showing
10 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
...thorization.k8s.io/clusterrolebindings/cluster-admins-nerc-reader/clusterrolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: cluster-admins-nerc-reader | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: cluster-reader | ||
subjects: | ||
- apiGroup: rbac.authorization.k8s.io | ||
kind: Group | ||
name: cluster-admins |
4 changes: 4 additions & 0 deletions
4
...ac.authorization.k8s.io/clusterrolebindings/cluster-admins-nerc-reader/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
12 changes: 12 additions & 0 deletions
12
...thorization.k8s.io/clusterrolebindings/cluster-admins-nerc-sudoer/clusterrolebinding.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: cluster-admins-nerc-sudoer | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: sudoer | ||
subjects: | ||
- apiGroup: rbac.authorization.k8s.io | ||
kind: Group | ||
name: cluster-admins |
4 changes: 4 additions & 0 deletions
4
...ac.authorization.k8s.io/clusterrolebindings/cluster-admins-nerc-sudoer/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
5 changes: 5 additions & 0 deletions
5
cluster-scope/base/user.openshift.io/groups/cluster-admins/group.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: user.openshift.io/v1 | ||
kind: Group | ||
metadata: | ||
name: cluster-admins | ||
users: [] |
4 changes: 4 additions & 0 deletions
4
cluster-scope/base/user.openshift.io/groups/cluster-admins/kustomization.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- group.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ../../base/rbac.authorization.k8s.io/clusterrolebindings/cluster-admins-nerc-sudoer | ||
- ../../base/rbac.authorization.k8s.io/clusterrolebindings/cluster-admins-nerc-reader | ||
- ../../base/user.openshift.io/groups/cluster-admins |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
cluster-scope/overlays/nerc-ocp-infra/groups/cluster-admins_patch.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
apiVersion: user.openshift.io/v1 | ||
kind: Group | ||
metadata: | ||
name: cluster-admins | ||
annotations: | ||
kustomize.config.k8s.io/behavior: replace | ||
users: | ||
- jtriley | ||
- larsks | ||
- tzumainn | ||
- chrisstafford | ||
- knikolla | ||
- aabaris | ||
- naved001 | ||
- joachimweyl | ||
- mikthoma |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ resources: | |
|
||
patches: | ||
- path: oauths/cluster_patch.yaml | ||
- path: groups/cluster-admins_patch.yaml |