-
Notifications
You must be signed in to change notification settings - Fork 338
/
Copy pathrbac.yaml
40 lines (38 loc) · 1.04 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
39
40
apiVersion: v1
kind: ServiceAccount
metadata:
name: local-volume-node-cleanup-controller
namespace: default
---
# CleanupController must be able to work with PVs, PVCs and Nodes.
# It also emits events before PVC deletion.
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: local-volume-node-cleanup-controller-runner
rules:
- apiGroups: [""]
resources: ["persistentvolumes"]
verbs: ["get", "list", "watch", "delete"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "delete"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: local-volume-node-cleanup-controller-role
subjects:
- kind: ServiceAccount
name: local-volume-node-cleanup-controller
namespace: default
roleRef:
kind: ClusterRole
name: local-volume-node-cleanup-controller-runner
apiGroup: rbac.authorization.k8s.io