11---
2+ {{- with .Values.csiNodeDriver }}
23apiVersion : apps/v1
34kind : DaemonSet
45metadata :
5- name : {{ include "operator.fullname" . }}-csi-node-driver
6+ name : {{ include "operator.fullname" $ }}-csi-node-driver
67 labels :
7- {{- include "operator.labels" . | nindent 4 }}
8+ {{- include "operator.labels" $ | nindent 4 }}
89spec :
910 selector :
1011 matchLabels :
1112 app.kubernetes.io/role : node-driver
12- {{- include "operator.selectorLabels" . | nindent 6 }}
13+ {{- include "operator.selectorLabels" $ | nindent 6 }}
1314 template :
1415 metadata :
15- {{- with .Values.podAnnotations }}
16+ {{- with $ .Values.podAnnotations }}
1617 annotations :
1718 {{- toYaml . | nindent 8 }}
1819 {{- end }}
1920 labels :
2021 app.kubernetes.io/role : node-driver
21- {{- include "operator.selectorLabels" . | nindent 8 }}
22+ {{- include "operator.selectorLabels" $ | nindent 8 }}
2223 spec :
23- {{- with .Values.image.pullSecrets }}
24+ {{- with $ .Values.image.pullSecrets }}
2425 imagePullSecrets :
2526 {{- toYaml . | nindent 8 }}
2627 {{- end }}
27- serviceAccountName : {{ include "operator.fullname" . }}-serviceaccount
28+ serviceAccountName : {{ include "operator.fullname" $ }}-serviceaccount
2829 securityContext :
29- {{- toYaml .Values.podSecurityContext | nindent 8 }}
30+ {{- toYaml $ .Values.podSecurityContext | nindent 8 }}
3031 containers :
3132 - name : csi-node-service
3233 securityContext :
33- {{- toYaml .Values.securityContext | nindent 12 }}
34- image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
35- imagePullPolicy : {{ .Values.image.pullPolicy }}
34+ {{- toYaml $ .Values.securityContext | nindent 12 }}
35+ image : " {{ $ .Values.image.repository }}:{{ $ .Values.image.tag | default $ .Chart.AppVersion }}"
36+ imagePullPolicy : {{ $ .Values.image.pullPolicy }}
3637 resources :
37- {{ .Values.node.driver.resources | toYaml | nindent 12 }}
38+ {{ $ .Values.node.driver.resources | toYaml | nindent 12 }}
3839 args :
3940 - run
4041 - node
6566 # The name of the Kubernetes Service that point to the operator Pod, e.g. used to
6667 # construct the conversion webhook endpoint.
6768 - name : OPERATOR_SERVICE_NAME
68- value : {{ include "operator.fullname" . }}
69+ value : {{ include "operator.fullname" $ }}
6970
7071 # Operators need to know the node name they are running on, to e.g. discover the
7172 # Kubernetes domain name from the kubelet API.
@@ -74,24 +75,24 @@ spec:
7475 fieldRef :
7576 fieldPath : spec.nodeName
7677
77- {{- if .Values.kubernetesClusterDomain }}
78+ {{- if $ .Values.kubernetesClusterDomain }}
7879 - name : KUBERNETES_CLUSTER_DOMAIN
79- value : {{ .Values.kubernetesClusterDomain | quote }}
80+ value : {{ $ .Values.kubernetesClusterDomain | quote }}
8081 {{- end }}
81- {{- include "telemetry.envVars" . | nindent 12 }}
82+ {{- include "telemetry.envVars" $ | nindent 12 }}
8283 volumeMounts :
8384 - name : csi
8485 mountPath : /csi
8586 - name : mountpoint
86- mountPath : {{ .Values.kubeletDir }}/pods
87+ mountPath : {{ $ .Values.kubeletDir }}/pods
8788 - name : node-driver-registrar
88- image : " {{ .Values.csiNodeDriverRegistrar. image.repository }}:{{ .Values.csiNodeDriverRegistrar .image.tag }}"
89- imagePullPolicy : {{ .Values.csiNodeDriverRegistrar. image.pullPolicy }}
89+ image : " {{ .image.repository }}:{{ .image.tag }}"
90+ imagePullPolicy : {{ .image.pullPolicy }}
9091 resources :
91- {{ .Values.csiNodeDriverRegistrar. resources | toYaml | nindent 12 }}
92+ {{ .resources | toYaml | nindent 12 }}
9293 args :
9394 - --csi-address=/csi/csi.sock
94- - --kubelet-registration-path={{ .Values.kubeletDir }}/plugins/listeners.stackable.tech/csi.sock
95+ - --kubelet-registration-path={{ $ .Values.kubeletDir }}/plugins/listeners.stackable.tech/csi.sock
9596 volumeMounts :
9697 - name : registration-sock
9798 mountPath : /registration
@@ -102,22 +103,23 @@ spec:
102103 hostPath :
103104 # node-driver-registrar appends a driver-unique filename to this path to avoid conflicts
104105 # see https://github.com/stackabletech/secret-operator/issues/229 for why this path should not be too long
105- path : {{ .Values.kubeletDir }}/plugins_registry
106+ path : {{ $ .Values.kubeletDir }}/plugins_registry
106107 - name : csi
107108 hostPath :
108- path : {{ .Values.kubeletDir }}/plugins/listeners.stackable.tech/
109+ path : {{ $ .Values.kubeletDir }}/plugins/listeners.stackable.tech/
109110 - name : mountpoint
110111 hostPath :
111- path : {{ .Values.kubeletDir }}/pods/
112- {{- with .Values.nodeSelector }}
112+ path : {{ $ .Values.kubeletDir }}/pods/
113+ {{- with $ .Values.nodeSelector }}
113114 nodeSelector :
114115 {{- toYaml . | nindent 8 }}
115116 {{- end }}
116- {{- with .Values.affinity }}
117+ {{- with $ .Values.affinity }}
117118 affinity :
118119 {{- toYaml . | nindent 8 }}
119120 {{- end }}
120- {{- with .Values.tolerations }}
121+ {{- with $ .Values.tolerations }}
121122 tolerations :
122123 {{- toYaml . | nindent 8 }}
123124 {{- end }}
125+ {{- end }}
0 commit comments