Skip to content

Commit 29fc2f4

Browse files
KeshavSoni2511mergify[bot]
authored andcommitted
helm: fix domainLabels empty array handling in template
The template check for domainLabels evaluates empty arrays as truthy, causing an invalid --domainlabels= flag to be generated. Fix by checking that the array is both defined and non-empty before generating the flag. Keep domainLabels: [] in values.yaml for better user experience - users can uncomment example values without needing to add the array syntax back. Signed-off-by: KeshavSoni2511 <keshavsoni2511@gmail.com> (cherry picked from commit 057d55b)
1 parent ad473d3 commit 29fc2f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

charts/ceph-csi-rbd/templates/nodeplugin-daemonset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ spec:
6666
- "--csi-addons-endpoint=$(CSI_ADDONS_ENDPOINT)"
6767
- "--v={{ .Values.logLevel }}"
6868
- "--drivername=$(DRIVER_NAME)"
69-
{{- if .Values.topology.domainLabels }}
69+
{{- if and .Values.topology.domainLabels (gt (len .Values.topology.domainLabels) 0) }}
7070
- "--domainlabels={{ .Values.topology.domainLabels | join "," }}"
7171
{{- end }}
7272
{{- if .Values.instanceID }}

0 commit comments

Comments
 (0)