diff --git a/helm-toolkit/templates/snippets/_kubernetes_upgrades_daemonset.tpl b/helm-toolkit/templates/snippets/_kubernetes_upgrades_daemonset.tpl index 29f287d19b..4849af27e5 100644 --- a/helm-toolkit/templates/snippets/_kubernetes_upgrades_daemonset.tpl +++ b/helm-toolkit/templates/snippets/_kubernetes_upgrades_daemonset.tpl @@ -15,14 +15,15 @@ {{- define "helm-toolkit.snippets.kubernetes_upgrades_daemonset" -}} {{- $envAll := index . 0 -}} {{- $component := index . 1 -}} -{{- $upgradeMap := index $envAll.Values.pod.lifecycle.upgrades.daemonsets $component }} +{{- $upgradeMap := index $envAll.Values.pod.lifecycle.upgrades.daemonsets $component -}} +{{- $pod_replacement_strategy := $envAll.Values.pod.lifecycle.upgrades.daemonsets.pod_replacement_strategy -}} {{- with $upgradeMap -}} {{- if .enabled }} minReadySeconds: {{ .min_ready_seconds }} updateStrategy: - type: {{ .pod_replacement_strategy }} - {{- if .pod_replacement_strategy }} - {{- if eq .pod_replacement_strategy "RollingUpdate" }} + type: {{ $pod_replacement_strategy }} + {{- if $pod_replacement_strategy }} + {{- if eq $pod_replacement_strategy "RollingUpdate" }} rollingUpdate: maxUnavailable: {{ .max_unavailable }} {{- end }}