Skip to content

Commit

Permalink
feature: additional cluster roles for secretproviderclasses
Browse files Browse the repository at this point in the history
Adding Admin and Viewer cluster roles, aggregaring to default "admin"
and "view" ClusterRoles.
Fixes kubernetes-sigs#835
  • Loading branch information
anapsix authored and Anastas Dancha committed Jan 11, 2022
1 parent aada382 commit 98bf1f1
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{ if .Values.rbac.install }}

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
name: secretproviderclasses-admin-role
rules:
- apiGroups:
- secrets-store.csi.x-k8s.io
resources:
- secretproviderclasses
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
{{ end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{ if .Values.rbac.install }}

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
name: secretproviderclasses-viewer-role
rules:
- apiGroups:
- secrets-store.csi.x-k8s.io
resources:
- secretproviderclasses
verbs:
- get
- list
- watch
{{ end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{{ if .Values.rbac.install }}

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rbac.authorization.k8s.io/aggregate-to-edit: "true"
name: secretproviderclasses-admin-role
rules:
- apiGroups:
- secrets-store.csi.x-k8s.io
resources:
- secretproviderclasses
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
{{ end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{ if .Values.rbac.install }}

---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
rbac.authorization.k8s.io/aggregate-to-view: "true"
name: secretproviderclasses-viewer-role
rules:
- apiGroups:
- secrets-store.csi.x-k8s.io
resources:
- secretproviderclasses
verbs:
- get
- list
- watch
{{ end }}

0 comments on commit 98bf1f1

Please sign in to comment.