-
Notifications
You must be signed in to change notification settings - Fork 26
/
rbac.yaml
38 lines (35 loc) · 1 KB
/
rbac.yaml
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
# This YAML file contains all RBAC objects that are necessary to run
# cluster-driver-registrar.
#
# In production, each CSI driver deployment has to be customized:
# - to avoid conflicts, use non-default namespace and different names
# for non-namespaced entities like the ClusterRole
apiVersion: v1
kind: ServiceAccount
metadata:
name: csi-cluster-driver-registrar
# replace with non-default namespace name
namespace: default
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cluster-driver-registrar-runner
rules:
- apiGroups: ["storage.k8s.io"]
resources: ["csidrivers"]
verbs: ["create", "delete"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: csi-cluster-driver-registrar-role
subjects:
- kind: ServiceAccount
name: csi-cluster-driver-registrar
# replace with non-default namespace name
namespace: default
roleRef:
kind: ClusterRole
name: cluster-driver-registrar-runner
apiGroup: rbac.authorization.k8s.io