From 0a2ecabb2b62b051c7fd7712422a956ae4735f2b Mon Sep 17 00:00:00 2001 From: Pete Birley Date: Fri, 13 Mar 2020 14:07:30 +0000 Subject: [PATCH] Revert "Make more sections in daemonset overridable." This reverts commit d74e93772684f99652dc6a8922f25c11d502f00e. This change looks ok, but we need use cases, and tests to make a change to such a complex and heavily used part of osh (see: http://eavesdrop.openstack.org/meetings/openstack_helm/2020/openstack_helm.2020-03-03-16.00.log.html) Change-Id: Ice77dcb53fee0e7a64ade9415f9cbf25f5d51d0e --- helm-toolkit/templates/utils/_daemonset_overrides.tpl | 4 +--- libvirt/templates/daemonset-libvirt.yaml | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/helm-toolkit/templates/utils/_daemonset_overrides.tpl b/helm-toolkit/templates/utils/_daemonset_overrides.tpl index eb9bfc9aa..10ab1660d 100644 --- a/helm-toolkit/templates/utils/_daemonset_overrides.tpl +++ b/helm-toolkit/templates/utils/_daemonset_overrides.tpl @@ -16,11 +16,10 @@ limitations under the License. {{- define "helm-toolkit.utils.daemonset_overrides" }} {{- $daemonset := index . 0 }} - {{- $daemonset_include := index . 1 }} + {{- $daemonset_yaml := index . 1 }} {{- $configmap_include := index . 2 }} {{- $configmap_name := index . 3 }} {{- $context := index . 4 }} - {{- $serviceAccountName := index . 5 }} {{- $_ := unset $context ".Files" }} {{- $daemonset_root_name := printf (print $context.Chart.Name "_" $daemonset) }} {{- $_ := set $context.Values "__daemonset_list" list }} @@ -202,7 +201,6 @@ limitations under the License. {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }} {{- $_ := set $current_dict "nodeData" $merged_dict }} {{/* Deep copy original daemonset_yaml */}} - {{- $daemonset_yaml := list $daemonset $configmap_name $serviceAccountName $current_dict.nodeData | include $daemonset_include | toString | fromYaml }} {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }} {{/* name needs to be a DNS-1123 compliant name. Ensure lower case */}} diff --git a/libvirt/templates/daemonset-libvirt.yaml b/libvirt/templates/daemonset-libvirt.yaml index 33dc72716..2c38feb2b 100644 --- a/libvirt/templates/daemonset-libvirt.yaml +++ b/libvirt/templates/daemonset-libvirt.yaml @@ -271,7 +271,8 @@ spec: {{- $_ := include "helm-toolkit.utils.dependency_resolver" $dependencyOpts | toString | fromYaml }} {{ tuple $envAll "pod_dependency" $serviceAccountName | include "helm-toolkit.snippets.kubernetes_pod_rbac_serviceaccount" }} -{{- $daemonset_include := "libvirt.daemonset" }} +{{- $daemonset_yaml := list $daemonset $configMapName $serviceAccountName . | include "libvirt.daemonset" | toString | fromYaml }} {{- $configmap_yaml := "libvirt.configmap.etc" }} -{{- list $daemonset $daemonset_include $configmap_yaml $configMapName . $serviceAccountName | include "helm-toolkit.utils.daemonset_overrides" }} +{{- list $daemonset $daemonset_yaml $configmap_yaml $configMapName . | include "helm-toolkit.utils.daemonset_overrides" }} + {{- end }}