2019-04-16 07:49:59 +00:00
|
|
|
{{- if .Values.rbac.create -}}
|
|
|
|
kind: ClusterRole
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}-rules
|
|
|
|
labels:
|
|
|
|
app: {{ include "ceph-csi-cephfs.name" . }}
|
|
|
|
chart: {{ include "ceph-csi-cephfs.chart" . }}
|
|
|
|
component: {{ .Values.provisioner.name }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: {{ .Release.Service }}
|
|
|
|
rbac.cephfs.csi.ceph.com/aggregate-to-{{ include "ceph-csi-cephfs.provisioner.fullname" . }}: "true"
|
|
|
|
rules:
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["nodes"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
|
|
|
verbs: ["get", "list"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["persistentvolumes"]
|
2019-11-25 11:09:24 +00:00
|
|
|
verbs: ["get", "list", "watch", "create", "delete","patch"]
|
2019-04-16 07:49:59 +00:00
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["persistentvolumeclaims"]
|
|
|
|
verbs: ["get", "list", "watch", "update"]
|
|
|
|
- apiGroups: ["storage.k8s.io"]
|
|
|
|
resources: ["storageclasses"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["events"]
|
|
|
|
verbs: ["list", "watch", "create", "update", "patch"]
|
|
|
|
- apiGroups: ["csi.storage.k8s.io"]
|
|
|
|
resources: ["csinodeinfos"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
2019-09-26 09:55:12 +00:00
|
|
|
{{- if .Values.provisioner.attacher.enabled }}
|
2019-04-16 07:49:59 +00:00
|
|
|
- apiGroups: ["storage.k8s.io"]
|
|
|
|
resources: ["volumeattachments"]
|
2019-09-26 09:55:12 +00:00
|
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
|
|
|
{{- end -}}
|
2019-11-25 11:09:24 +00:00
|
|
|
{{- if semverCompare ">=1.15" .Capabilities.KubeVersion.GitVersion -}}
|
|
|
|
{{- if .Values.provisioner.resizer.enabled }}
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["persistentvolumeclaims/status"]
|
|
|
|
verbs: ["update", "patch"]
|
|
|
|
{{- end -}}
|
|
|
|
{{- end -}}
|
2019-04-16 07:49:59 +00:00
|
|
|
{{- end -}}
|