Skip to content

Commit

Permalink
Merge pull request #413 from abhi-kn/console_crd_reader
Browse files Browse the repository at this point in the history
Bug 1826716: RBAC to authorise service account to list CRDs
  • Loading branch information
openshift-merge-robot committed Apr 22, 2020
2 parents 7513c00 + 1ed47ce commit 04ecd9f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
14 changes: 14 additions & 0 deletions manifests/03-rbac-role-cluster.yaml
Expand Up @@ -68,3 +68,17 @@ rules:
- create
- update
- delete
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: console
rules:
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- list
- watch
15 changes: 15 additions & 0 deletions manifests/04-rbac-rolebinding-cluster.yaml
Expand Up @@ -39,3 +39,18 @@ subjects:
- kind: ServiceAccount
name: console-operator
namespace: openshift-console-operator
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: console
roleRef:
# CRD lists are protected from unpriviledged users, access is
# granted to Service Account by this ClusterRole
kind: ClusterRole
name: console
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: console
namespace: openshift-console

0 comments on commit 04ecd9f

Please sign in to comment.