From 750394ee5454763dd5c7a4e2cf72a45588c79f33 Mon Sep 17 00:00:00 2001 From: "Sphicas, Phil (ps3910)" Date: Thu, 26 Sep 2019 09:59:04 -0700 Subject: [PATCH] helm-toolkit fix dependency resolver Fixes an issue where dependencies are leaking from one resource to another by ensuring that `envAll.Values.__dep` is reset each time. Change-Id: I34a4b2fa70d608b2c69bdf18275e439f96976229 Closes-Bug: #1845538 --- helm-toolkit/templates/utils/_dependency_resolver.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-toolkit/templates/utils/_dependency_resolver.tpl b/helm-toolkit/templates/utils/_dependency_resolver.tpl index f36fbee85..e9bf10b8e 100644 --- a/helm-toolkit/templates/utils/_dependency_resolver.tpl +++ b/helm-toolkit/templates/utils/_dependency_resolver.tpl @@ -27,8 +27,8 @@ limitations under the License. {{- $_ := set $envAll.Values "pod_dependency" ( index $envAll.Values.dependencies.static $dependencyKey ) }} {{- end }} {{- else if kindIs "slice" $dependencyMixinParam }} +{{- $_ := set $envAll.Values "__deps" ( index $envAll.Values.dependencies.static $dependencyKey ) }} {{- range $k, $v := $dependencyMixinParam -}} -{{- if not $envAll.Values.__deps }}{{- $_ := set $envAll.Values "__deps" ( index $envAll.Values.dependencies.static $dependencyKey ) }}{{- end }} {{- $_ := include "helm-toolkit.utils.merge" (tuple $envAll.Values.pod_dependency $envAll.Values.__deps ( index $envAll.Values.dependencies.dynamic.targeted $v $dependencyKey ) ) -}} {{- $_ := set $envAll.Values "__deps" $envAll.Values.pod_dependency -}} {{- end }}