-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpriority-controller.yaml
111 lines (111 loc) · 3.22 KB
/
priority-controller.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
kind: Namespace
apiVersion: v1
metadata:
name: priority-system
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: priority-controllers
namespace: priority-system
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: priority-controllers
rules:
- apiGroups: ["priority.hae.com"]
resources: ["penaltys"]
verbs:
["create", "get", "list", "watch", "update", "bind", "delete", "patch"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions"]
verbs: ["create", "get", "list", "watch", "delete"]
- apiGroups: ["batch.volcano.sh"]
resources: ["jobs"]
verbs: ["get", "list", "watch", "update", "delete", "patch"]
- apiGroups: ["batch.volcano.sh"]
resources: ["jobs/status", "jobs/finalizers"]
verbs: ["update", "patch"]
- apiGroups: ["bus.volcano.sh"]
resources: ["commands"]
verbs: ["get", "list", "watch", "delete"]
- apiGroups: [""]
resources: ["events"]
verbs: ["create", "list", "watch", "update", "patch"]
- apiGroups: [""]
resources: ["pods/status"]
verbs:
["create", "get", "list", "watch", "update", "bind", "delete", "patch"]
- apiGroups: [""]
resources: ["pods"]
verbs:
["create", "get", "list", "watch", "update", "bind", "delete", "patch"]
- apiGroups: [""]
resources: ["pods/finalizers"]
verbs: ["update", "patch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims"]
verbs: ["get", "list", "watch", "create"]
- apiGroups: [""]
resources: ["services"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch", "create", "delete", "update"]
- apiGroups: [""]
resources: ["secrets"]
verbs: ["get", "list", "watch", "create", "delete", "update"]
- apiGroups: ["scheduling.incubator.k8s.io", "scheduling.volcano.sh"]
resources: ["podgroups", "queues", "queues/status"]
verbs: ["get", "list", "watch", "create", "delete", "update", "patch"]
- apiGroups: ["scheduling.k8s.io"]
resources: ["priorityclasses"]
verbs: ["get", "list", "watch", "create", "delete"]
- apiGroups: ["networking.k8s.io"]
resources: ["networkpolicies"]
verbs: ["get", "create", "delete"]
- apiGroups: ["apps"]
resources: ["daemonsets", "statefulsets"]
verbs: ["get"]
- apiGroups: ["apps"]
resources: ["replicasets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["batch"]
resources: ["jobs"]
verbs: ["get"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: priority-controllers
subjects:
- kind: ServiceAccount
name: priority-controllers
namespace: priority-system
roleRef:
kind: ClusterRole
name: priority-controllers
apiGroup: rbac.authorization.k8s.io
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: priority-controller
namespace: priority-system
spec:
replicas: 1
selector:
matchLabels:
app: priority-controller
template:
metadata:
labels:
app: priority-controller
spec:
serviceAccount: priority-controllers
priorityClassName: system-cluster-critical
containers:
- name: myapp
image: ysp9714/priority:0.0.2
imagePullPolicy: Always