2019-02-21 04:30:21 +00:00
|
|
|
{{- if .Values.rbac.create -}}
|
|
|
|
kind: ClusterRole
|
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
metadata:
|
|
|
|
name: {{ include "ceph-csi-cephfs.provisioner.fullname" . }}
|
|
|
|
labels:
|
|
|
|
app: {{ include "ceph-csi-cephfs.name" . }}
|
|
|
|
chart: {{ include "ceph-csi-cephfs.chart" . }}
|
|
|
|
component: {{ .Values.provisioner.name }}
|
|
|
|
release: {{ .Release.Name }}
|
|
|
|
heritage: {{ .Release.Service }}
|
2022-10-14 14:59:09 +00:00
|
|
|
{{- with .Values.commonLabels }}{{ toYaml . | trim | nindent 4 }}{{- end }}
|
2020-08-12 15:25:36 +00:00
|
|
|
rules:
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["secrets"]
|
|
|
|
verbs: ["get", "list"]
|
|
|
|
- apiGroups: [""]
|
2024-03-18 08:50:13 +00:00
|
|
|
resources: ["configmaps"]
|
|
|
|
verbs: ["get"]
|
|
|
|
- apiGroups: [""]
|
2020-08-12 15:25:36 +00:00
|
|
|
resources: ["persistentvolumes"]
|
2022-07-05 09:11:59 +00:00
|
|
|
verbs: ["get", "list", "watch", "create", "update", "delete","patch"]
|
2020-08-12 15:25:36 +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"]
|
2022-01-17 12:58:38 +00:00
|
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
|
|
resources: ["volumesnapshots/status"]
|
|
|
|
verbs: ["update", "patch"]
|
2020-08-12 15:25:36 +00:00
|
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
|
|
resources: ["volumesnapshotclasses"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
|
|
resources: ["volumesnapshotcontents/status"]
|
2022-01-17 12:58:38 +00:00
|
|
|
verbs: ["update", "patch"]
|
2024-02-20 08:06:27 +00:00
|
|
|
{{- if .Values.provisioner.snapshotter.args.enableVolumeGroupSnapshots }}
|
|
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
|
|
resources: ["volumesnapshots"]
|
|
|
|
verbs: ["get", "list", "watch", "update", "patch", "create"]
|
|
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
|
|
resources: ["volumesnapshotcontents"]
|
|
|
|
verbs: ["get", "list", "watch", "update", "patch", "create"]
|
|
|
|
- apiGroups: ["groupsnapshot.storage.k8s.io"]
|
|
|
|
resources: ["volumegroupsnapshotclasses"]
|
|
|
|
verbs: ["get", "list", "watch"]
|
|
|
|
- apiGroups: ["groupsnapshot.storage.k8s.io"]
|
|
|
|
resources: ["volumegroupsnapshotcontents"]
|
|
|
|
verbs: ["get", "list", "watch", "update", "patch"]
|
|
|
|
- apiGroups: ["groupsnapshot.storage.k8s.io"]
|
|
|
|
resources: ["volumegroupsnapshotcontents/status"]
|
|
|
|
verbs: ["update", "patch"]
|
|
|
|
{{ else }}
|
|
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
|
|
resources: ["volumesnapshots"]
|
|
|
|
verbs: ["get", "list", "patch"]
|
|
|
|
- apiGroups: ["snapshot.storage.k8s.io"]
|
|
|
|
resources: ["volumesnapshotcontents"]
|
|
|
|
verbs: ["create", "get", "list", "watch", "update", "delete", "patch"]
|
|
|
|
{{- end -}}
|
2020-08-12 15:25:36 +00:00
|
|
|
{{- if .Values.provisioner.resizer.enabled }}
|
|
|
|
- apiGroups: [""]
|
|
|
|
resources: ["persistentvolumeclaims/status"]
|
|
|
|
verbs: ["update", "patch"]
|
|
|
|
{{- end -}}
|
2019-02-21 04:30:21 +00:00
|
|
|
{{- end -}}
|