-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqos-controller.yaml
119 lines (115 loc) · 2.49 KB
/
qos-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
112
113
114
115
116
117
118
119
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: qos-controller
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: qos-controller-role
rules:
- apiGroups:
- ""
- "storage.k8s.io"
resources:
- persistentvolumeclaims
- persistentvolumes
verbs:
- get
- list
- watch
- apiGroups:
- "coordination.k8s.io"
- ""
resources:
- leases
- events
verbs:
- create
- get
- list
- update
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: qos-controller-global
subjects:
- kind: ServiceAccount
name: qos-controller
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: qos-controller-role
---
apiVersion: v1
kind: ConfigMap
metadata:
name: qos-controller-config
namespace: kube-system
data:
config.yaml: |
leaderElection:
leaderElect: true
leaseDuration: 30s
renewDeadline: 15s
resyncPeriod: 5s
resourceName: qos-controller-leader-lock
resourceLock: endpointsleases
resourceNamespace: kube-system
controllerConfig:
cephRBD:
provisioner: rook-ceph.rbd.csi.ceph.com
monitors: 172.18.29.164:6789,172.18.29.165:6789,172.18.29.173:6789
user: admin
key: AQALxIVjaVbsNRAAGm54ScmSE9obj9F/jVhGaw==
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: qos-controller
namespace: kube-system
labels:
app: qos-controller
spec:
replicas: 2
selector:
matchLabels:
app: qos-controller
template:
metadata:
labels:
app: qos-controller
spec:
hostNetwork: true
containers:
- name: qos-controller
image: crazytaxii/volume-qos-controller:latest
command:
- qos-controller
args:
- run
- --config-file=/etc/qos-controller/config.yaml
imagePullPolicy: Always
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 200m
memory: 256Mi
volumeMounts:
- name: config
mountPath: /etc/qos-controller
readOnly: true
serviceAccountName: qos-controller
volumes:
- name: config
configMap:
name: qos-controller-config
items:
- key: config.yaml
path: config.yaml