blob: 4c048a42de42aac2c3c69eda724748bdee2bfd3d (
plain)
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
|
---
# Source: cmk/templates/serviceaccount.yml
apiVersion: v1
kind: ServiceAccount
metadata:
name: cmk
namespace: kube-system
---
# Source: cmk/templates/rbac.yml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: cmk-custom-resource-definition-controller
namespace: kube-system
rules:
- apiGroups: ["intel.com"]
resources: ["*"]
verbs: ["*"]
- apiGroups: ["apiextensions.k8s.io"]
resources: ["customresourcedefinitions", "customresourcedefinitions.extensions"]
verbs: ["*"]
---
# Source: cmk/templates/rbac.yml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: cmk-daemonset-controller
namespace: kube-system
rules:
- apiGroups: ["extensions"]
resources: ["daemonsets", "daemonsets.extensions"]
verbs: ["*"]
---
# Source: cmk/templates/rbac.yml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: cmk-third-party-resource-controller
namespace: kube-system
rules:
- apiGroups: ["cmk.intel.com"]
resources: ["*"]
verbs: ["*"]
- apiGroups: ["extensions"]
resources: ["thirdpartyresources", "thirdpartyresources.extensions"]
verbs: ["*"]
---
# Source: cmk/templates/rbac.yml
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: cmk-version-controller
namespace: kube-system
rules:
- nonResourceURLs: ["*"]
verbs:
- get
---
# Source: cmk/templates/rbac.yml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: cmk-role-binding-version
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cmk-version-controller
subjects:
- kind: ServiceAccount
name: cmk
namespace: kube-system
---
# Source: cmk/templates/rbac.yml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: cmk-role-binding-daemonset
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cmk-daemonset-controller
subjects:
- kind: ServiceAccount
name: cmk
namespace: kube-system
---
# Source: cmk/templates/rbac.yml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: cmk-role-binding-node
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: system:node
subjects:
- kind: ServiceAccount
name: cmk
namespace: kube-system
---
# Source: cmk/templates/rbac.yml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: cmk-role-binding-tpr
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cmk-third-party-resource-controller
subjects:
- kind: ServiceAccount
name: cmk
namespace: kube-system
---
# Source: cmk/templates/rbac.yml
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: cmk-role-binding-crd
namespace: kube-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cmk-custom-resource-definition-controller
subjects:
- kind: ServiceAccount
name: cmk
namespace: kube-system
---
# Source: cmk/templates/daemonset.yml
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: cmk
labels:
app: cmk
namespace: kube-system
spec:
selector:
matchLabels:
name: cmk
template:
metadata:
labels:
name: cmk
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
serviceAccountName: cmk
tolerations:
- key: cmk
operator: Exists
containers:
- name: reconcile
image: localhost:5000/cmk:v1.4.1
imagePullPolicy: IfNotPresent
env:
- name: CMK_RECONCILE_SLEEP_TIME
value: '60'
- name: CMK_PROC_FS
value: /proc
- name: NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
command: ["/bin/bash", "-c"]
args:
- "/cmk/cmk.py isolate --pool=infra /cmk/cmk.py -- reconcile --interval=$CMK_RECONCILE_SLEEP_TIME --publish"
volumeMounts:
- mountPath: /proc
name: host-proc
readOnly: false
- mountPath: /etc/cmk
name: cmk-conf-dir
- mountPath: /opt/bin
name: cmk-install-dir
- name: nodereport
image: localhost:5000/cmk:v1.4.1
imagePullPolicy: IfNotPresent
env:
- name: CMK_NODE_REPORT_SLEEP_TIME
value: '60'
- name: CMK_PROC_FS
value: /proc
- name: NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
command: ["/bin/bash", "-c"]
args:
- "/cmk/cmk.py isolate --pool=infra /cmk/cmk.py -- node-report --interval=$CMK_NODE_REPORT_SLEEP_TIME --publish"
volumeMounts:
- mountPath: /proc
name: host-proc
readOnly: false
- mountPath: /etc/cmk
name: cmk-conf-dir
- mountPath: /opt/bin
name: cmk-install-dir
initContainers:
- name: init
image: localhost:5000/cmk:v1.4.1
imagePullPolicy: IfNotPresent
env:
- name: CMK_PROC_FS
value: "/proc"
- name: NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
command: ["/bin/bash", "-c"]
args:
- "/cmk/cmk.py init --conf-dir=/etc/cmk --exclusive-mode=packed --num-exclusive-cores=0 --shared-mode=packed --num-shared-cores=0"
volumeMounts:
- mountPath: /proc
name: host-proc
readOnly: false
- mountPath: /etc/cmk
name: cmk-conf-dir
readOnly: false
- mountPath: /opt/bin
name: cmk-install-dir
readOnly: false
- name: discover
image: localhost:5000/cmk:v1.4.1
imagePullPolicy: IfNotPresent
env:
- name: CMK_PROC_FS
value: /proc
- name: NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
command: ["/bin/bash", "-c"]
args:
# - "echo -en '\n'; ls -a /etc/cmk; sleep 10;"
- "until [ -d /etc/cmk ]; do sleep 1; done; /cmk/cmk.py discover"
volumeMounts:
- mountPath: /proc
name: host-proc
readOnly: false
- mountPath: /etc/cmk
name: cmk-conf-dir
readOnly: false
- mountPath: /opt/bin
name: cmk-install-dir
readOnly: false
- name: install
image: localhost:5000/cmk:v1.4.1
imagePullPolicy: IfNotPresent
env:
- name: CMK_PROC_FS
value: /proc
- name: NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
command: ["/bin/bash", "-c"]
args:
- "/cmk/cmk.py install"
volumeMounts:
- mountPath: /proc
name: host-proc
readOnly: false
- mountPath: /etc/cmk
name: cmk-conf-dir
- mountPath: /opt/bin
name: cmk-install-dir
# restartPolicy: Never
volumes:
- hostPath:
path: /proc
# type: ""
name: host-proc
- hostPath:
path: /etc/cmk
# type: ""
name: cmk-conf-dir
- hostPath:
path: /opt/bin
# type: ""
name: cmk-install-dir
|