-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrbac.yaml
More file actions
51 lines (51 loc) · 1.33 KB
/
rbac.yaml
File metadata and controls
51 lines (51 loc) · 1.33 KB
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
41
42
43
44
45
46
47
48
49
50
51
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: azure-scheduledevents
rules:
# Allow azure-scheduledevents to read spec.unschedulable
# Allow kubectl to drain/uncordon
#
# NB: These permissions are tightly coupled to the bundled version of kubectl; the ones below
# match https://github.com/kubernetes/kubernetes/blob/v1.17.7/staging/src/k8s.io/kubectl/pkg/cmd/drain/drain.go
#
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "patch"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["list","delete","get"]
- apiGroups: ["apps"]
resources: ["daemonsets"]
verbs: ["get"]
- apiGroups: [""]
resources: ["pods/eviction"]
verbs: ["create"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: azure-scheduledevents
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: azure-scheduledevents
subjects:
- kind: ServiceAccount
name: azure-scheduledevents
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
namespace: kube-system
name: azure-scheduledevents
subjects:
- kind: ServiceAccount
namespace: kube-system
name: azure-scheduledevents
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: azure-scheduledevents