1
+ ---
1
2
apiVersion : v1
2
3
kind : ServiceAccount
3
4
metadata :
4
- name : {{ .Release.Name }}-node
5
- namespace : {{ .Release.Namespace }}
5
+ name : {{.Release.Name}}-node
6
+ namespace : {{.Release.Namespace}}
6
7
---
7
8
kind : ClusterRole
8
9
apiVersion : rbac.authorization.k8s.io/v1
@@ -16,6 +17,21 @@ rules:
16
17
- apiGroups : [""]
17
18
resources : ["nodes"]
18
19
verbs : ["get", "list", "watch", "update", "patch"]
20
+ - apiGroups : [ "" ]
21
+ resources : [ "persistentvolumes" ]
22
+ verbs : [ "create", "delete", "get", "list", "watch", "update" ]
23
+ - apiGroups : [ "" ]
24
+ resources : [ "persistentvolumesclaims" ]
25
+ verbs : [ "get", "list", "watch", "update" ]
26
+ - apiGroups : [ "" ]
27
+ resources : [ "events" ]
28
+ verbs : [ "get", "list", "watch", "create", "update", "patch" ]
29
+ - apiGroups : [ "storage.k8s.io" ]
30
+ resources : [ "volumeattachments" ]
31
+ verbs : [ "get", "list", "watch", "update" ]
32
+ - apiGroups : [ "storage.k8s.io" ]
33
+ resources : [ "storageclasses" ]
34
+ verbs : [ "get", "list", "watch" ]
19
35
{{- if eq .Values.openshift true }}
20
36
- apiGroups : ["security.openshift.io"]
21
37
resources : ["securitycontextconstraints"]
@@ -40,6 +56,14 @@ rules:
40
56
resources : [ "pods" ]
41
57
verbs : [ "get", "list", "watch", "update", "patch" ]
42
58
{{- end}}
59
+ # below for podmon
60
+ {{- if hasKey .Values "podmon" }}
61
+ {{- if eq .Values.podmon.enabled true }}
62
+ - apiGroups : [ "" ]
63
+ resources : [ "pods" ]
64
+ verbs : [ "get", "list", "watch", "update", "delete" ]
65
+ {{- end }}
66
+ {{- end }}
43
67
---
44
68
kind : ClusterRoleBinding
45
69
apiVersion : rbac.authorization.k8s.io/v1
83
107
kubectl.kubernetes.io/default-container : " driver"
84
108
labels :
85
109
app : {{ .Release.Name }}-node
110
+ {{- if .Values.podmon.enabled }}
111
+ driver.dellemc.com : dell-storage
112
+ {{- end }}
86
113
spec :
87
114
serviceAccountName : {{ .Release.Name }}-node
88
115
{{ if .Values.node.nodeSelector }}
@@ -168,7 +195,7 @@ spec:
168
195
{{- end }}
169
196
- name : X_CSI_POWERMAX_PROXY_SERVICE_NAME
170
197
value : {{ .Release.Name }}-reverseproxy
171
- - name : X_CSI_ISCSI_CHROOT
198
+ - name : X_CSI_NODE_CHROOT
172
199
value : {{ .Values.ISCSIChroot | default "/noderoot" }}
173
200
- name : X_CSI_GRPC_MAX_THREADS
174
201
value : " 50"
@@ -218,12 +245,29 @@ spec:
218
245
name : {{ .Values.vSphere.vCenterCredSecret }}
219
246
key : password
220
247
{{- end }}
248
+ {{- if hasKey .Values "podmon" }}
249
+ - name : X_CSI_PODMON_ENABLED
250
+ value : " {{ .Values.podmon.enabled }}"
251
+ {{- if eq .Values.podmon.enabled true }}
252
+ {{- range $key, $value := .Values.podmon.node.args }}
253
+ {{- if contains "--arrayConnectivityPollRate" $value }}
254
+ - name : X_CSI_PODMON_ARRAY_CONNECTIVITY_POLL_RATE
255
+ value : " {{ (split " =" $value)._1 }}"
256
+ {{- end }}
257
+ {{- end }}
258
+ {{- end }}
259
+ {{- end }}
260
+ - name : X_CSI_PODMON_API_PORT
261
+ value : " {{ .Values.podmon.podmonAPIPort }}"
221
262
volumeMounts :
222
263
- name : driver-path
223
264
mountPath : {{ .Values.kubeletConfigDir }}/plugins/powermax.emc.dell.com
224
265
- name : volumedevices-path
225
266
mountPath : {{ .Values.kubeletConfigDir }}/plugins/kubernetes.io/csi/volumeDevices
226
267
mountPropagation : " Bidirectional"
268
+ - name : csi-path
269
+ mountPath : {{ .Values.kubeletConfigDir }}/plugins/kubernetes.io/csi
270
+ mountPropagation : " Bidirectional"
227
271
- name : pods-path
228
272
mountPath : {{ .Values.kubeletConfigDir }}/pods
229
273
mountPropagation : " Bidirectional"
@@ -342,6 +386,58 @@ spec:
342
386
mountPath : /etc/karavi-authorization
343
387
{{ end }}
344
388
{{ end }}
389
+ {{- if hasKey .Values "podmon" }}
390
+ {{- if eq .Values.podmon.enabled true }}
391
+ - name : podmon
392
+ securityContext :
393
+ privileged : true
394
+ capabilities :
395
+ add : [ "SYS_ADMIN" ]
396
+ allowPrivilegeEscalation : true
397
+ image : {{ required "Must provide the podmon container image." .Values.images.podmon }}
398
+ imagePullPolicy : {{ .Values.imagePullPolicy }}
399
+ args :
400
+ {{- toYaml .Values.podmon.node.args | nindent 12 }}
401
+ env :
402
+ - name : KUBE_NODE_NAME
403
+ valueFrom :
404
+ fieldRef :
405
+ apiVersion : v1
406
+ fieldPath : spec.nodeName
407
+ - name : X_CSI_PRIVATE_MOUNT_DIR
408
+ value : {{ .Values.kubeletConfigDir }}
409
+ - name : MY_NODE_NAME
410
+ valueFrom :
411
+ fieldRef :
412
+ fieldPath : spec.nodeName
413
+ - name : MY_POD_NAME
414
+ valueFrom :
415
+ fieldRef :
416
+ fieldPath : metadata.name
417
+ - name : MY_POD_NAMESPACE
418
+ valueFrom :
419
+ fieldRef :
420
+ fieldPath : metadata.namespace
421
+ volumeMounts :
422
+ - name : kubelet-pods
423
+ mountPath : {{ .Values.kubeletConfigDir }}/pods
424
+ mountPropagation : " Bidirectional"
425
+ - name : driver-path
426
+ mountPath : {{ .Values.kubeletConfigDir }}/plugins/powermax.emc.dell.com
427
+ mountPropagation : " Bidirectional"
428
+ - name : csi-path
429
+ mountPath : {{ .Values.kubeletConfigDir }}/plugins/kubernetes.io/csi
430
+ mountPropagation : " Bidirectional"
431
+ - name : dev
432
+ mountPath : /dev
433
+ - name : usr-bin
434
+ mountPath : /usr-bin
435
+ - name : var-run
436
+ mountPath : /var/run
437
+ - name : powermax-config-params
438
+ mountPath : /powermax-config-params
439
+ {{- end }}
440
+ {{- end }}
345
441
volumes :
346
442
- name : registration-dir
347
443
hostPath :
@@ -359,6 +455,9 @@ spec:
359
455
hostPath :
360
456
path : {{ .Values.kubeletConfigDir }}/pods
361
457
type : Directory
458
+ - name : csi-path
459
+ hostPath :
460
+ path : {{ .Values.kubeletConfigDir }}/plugins/kubernetes.io/csi
362
461
- name : dev
363
462
hostPath :
364
463
path : /dev
@@ -378,17 +477,17 @@ spec:
378
477
- name : powermax-config-params
379
478
configMap :
380
479
name : {{ .Release.Name }}-config-params
480
+ - name : certs
481
+ secret :
482
+ secretName : {{ .Release.Name }}-certs
483
+ optional : true
381
484
{{- if hasKey .Values.node "topologyControl" }}
382
485
{{- if eq .Values.node.topologyControl.enabled true }}
383
486
- name : node-topology-config
384
487
configMap :
385
488
name : node-topology-config
386
489
{{- end }}
387
490
{{- end }}
388
- - name : certs
389
- secret :
390
- secretName : {{ .Release.Name }}-certs
391
- optional : true
392
491
{{- if hasKey .Values "authorization" }}
393
492
{{- if eq .Values.authorization.enabled true }}
394
493
- name : karavi-authorization-config
@@ -399,3 +498,15 @@ spec:
399
498
secretName : proxy-server-root-certificate
400
499
{{ end }}
401
500
{{ end }}
501
+ - name : usr-bin
502
+ hostPath :
503
+ path : /usr/bin
504
+ type : Directory
505
+ - name : kubelet-pods
506
+ hostPath :
507
+ path : /var/lib/kubelet/pods
508
+ type : Directory
509
+ - name : var-run
510
+ hostPath :
511
+ path : /var/run
512
+ type : Directory
0 commit comments