aboutsummaryrefslogtreecommitdiffstats
path: root/vnfs/DAaaS/00-init/rook-ceph/templates/clusterrolebinding.yaml
blob: 845eb6d7b6cf3db6b8050aea1f7e74c1660420c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{{- if .Values.rbacEnable }}
# Grant the rook system daemons cluster-wide access to manage the Rook CRDs, PVCs, and storage classes
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
  name: rook-ceph-global
  labels:
    operator: rook
    storage-backend: ceph
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: rook-ceph-global
subjects:
- kind: ServiceAccount
  name: rook-ceph-system
  namespace: {{ .Release.Namespace }}
{{- if .Values.pspEnable }}
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: rook-ceph-system-psp-users
  labels:
    operator: rook
    storage-backend: ceph
    chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: rook-ceph-system-psp-user
subjects:
- kind: ServiceAccount
  name: rook-ceph-system
  namespace: {{ .Release.Namespace }}
{{- end }}
{{- end }}