File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -471,12 +471,14 @@ toleration generates toleration settings for the CSI Driver.
471471topologySpreadConstraints appends the " vso.chart.selectorLabels" to .Values.controller.topologySpreadConstraints if no labelSelector was specified
472472*/} }
473473{ {- define " vso.topologySpreadConstraints" -} }
474- { {- $defaultLabelSelector := dict " labelSelector" (dict " matchLabels" (include " vso.chart.selectorLabels" . | fromYaml)) -} }
475- { {- range $topologySpreadConstraint := .Values.controller.topologySpreadConstraints -} }
476- { {- if hasKey $topologySpreadConstraint " labelSelector" -} }
477- { {- $topologySpreadConstraint | list | toYaml -} }
478- { {- else -} }
479- { {- merge $topologySpreadConstraint $defaultLabelSelector | list | toYaml -} }
480- { {- end -} }
474+ { {- $default := dict " labelSelector" (dict " matchLabels" (include " vso.chart.selectorLabels" . | fromYaml)) -} }
475+ { {- $out := list -} }
476+ { {- range $c := .Values.controller.topologySpreadConstraints -} }
477+ { {- if hasKey $c " labelSelector" -} }
478+ { {- $out = append $out $c -} }
479+ { {- else -} }
480+ { {- $out = append $out (merge $c $default ) -} }
481+ { {- end -} }
481482{ {- end -} }
483+ { {- toYaml $out -} }
482484{ {- end -} }
You can’t perform that action at this time.
0 commit comments