Skip to content

Commit

Permalink
Kanister Operator RBAC (#4497)
Browse files Browse the repository at this point in the history
with a new feature we are using PV and PVC
and this requires additional permissions.
  • Loading branch information
Ilya Kislenko committed Dec 8, 2018
1 parent afe6057 commit ff5051d
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 1 deletion.
41 changes: 41 additions & 0 deletions bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,47 @@ rules:
- "*"
verbs:
- "*"
- apiGroups:
- ""
resources:
- persistentvolumes
verbs:
- create
- delete
- get
- list
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- get
- list
- update
- watch
- apiGroups:
- storage.k8s.io
resources:
- storageclasses
verbs:
- get
- list
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- watch
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- update
---
apiVersion: v1
kind: ServiceAccount
Expand Down
2 changes: 1 addition & 1 deletion helm/kanister-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ maintainers:
- email: tom@kasten.io
name: tdmanv
icon: https://kasten.io/assets/img/kanister-logo.png
appVersion: 0.10.0
appVersion: 0.14.0
source: https://github.com/kanisterio/kanister
15 changes: 15 additions & 0 deletions helm/kanister-operator/templates/rbac.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,18 @@ subjects:
name: {{ template "kanister-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
{{- end }}
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
labels:
{{ include "kanister-operator.helmLabels" . | indent 4 }}
name: {{ template "kanister-operator.fullname" . }}-pv-provisioner
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:persistent-volume-provisioner
subjects:
- kind: ServiceAccount
name: {{ template "kanister-operator.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}

0 comments on commit ff5051d

Please sign in to comment.