1 From b3829fef30e76fdf498fa1d0d35185f642dce5f6 Mon Sep 17 00:00:00 2001
2 From: Robert Church <robert.church@windriver.com>
3 Date: Mon, 8 Apr 2019 02:12:39 -0400
4 Subject: [PATCH 4/4] Partial revert of
5 31e3469d28858d7b5eb6355e88b6f49fd62032be
7 Suspect that new use of mergeOverwrite vs. merge is breaking the
8 per-host DaemonSet overrides.
10 Signed-off-by: Robert Church <robert.church@windriver.com>
12 helm-toolkit/templates/utils/_daemonset_overrides.tpl | 12 ++++++------
13 1 file changed, 6 insertions(+), 6 deletions(-)
15 diff --git a/helm-toolkit/templates/utils/_daemonset_overrides.tpl b/helm-toolkit/templates/utils/_daemonset_overrides.tpl
16 index 10ab166..ab1177a 100644
17 --- a/helm-toolkit/templates/utils/_daemonset_overrides.tpl
18 +++ b/helm-toolkit/templates/utils/_daemonset_overrides.tpl
19 @@ -49,10 +49,10 @@ limitations under the License.
20 {{- $override_conf_copy := $host_data.conf }}
21 {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
22 {{- $root_conf_copy := omit ($context.Values.conf | toYaml | fromYaml) "overrides" }}
23 - {{- $merged_dict := mergeOverwrite $root_conf_copy $override_conf_copy }}
24 + {{- $merged_dict := merge $override_conf_copy $root_conf_copy }}
25 {{- $root_conf_copy2 := dict "conf" $merged_dict }}
26 {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "conf") "__daemonset_list" }}
27 - {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
28 + {{- $root_conf_copy3 := merge $context_values $root_conf_copy2 }}
29 {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
30 {{- $_ := set $current_dict "nodeData" $root_conf_copy4 }}
32 @@ -89,10 +89,10 @@ limitations under the License.
33 {{- $override_conf_copy := $label_data.conf }}
34 {{/* Deep copy to prevent https://storyboard.openstack.org/#!/story/2005936 */}}
35 {{- $root_conf_copy := omit ($context.Values.conf | toYaml | fromYaml) "overrides" }}
36 - {{- $merged_dict := mergeOverwrite $root_conf_copy $override_conf_copy }}
37 + {{- $merged_dict := merge $override_conf_copy $root_conf_copy }}
38 {{- $root_conf_copy2 := dict "conf" $merged_dict }}
39 {{- $context_values := omit (omit ($context.Values | toYaml | fromYaml) "conf") "__daemonset_list" }}
40 - {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
41 + {{- $root_conf_copy3 := merge $context_values $root_conf_copy2 }}
42 {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
43 {{- $_ := set $context.Values.__current_label "nodeData" $root_conf_copy4 }}
45 @@ -187,7 +187,7 @@ limitations under the License.
46 {{- $root_conf_copy1 := omit $context.Values.conf "overrides" }}
47 {{- $root_conf_copy2 := dict "conf" $root_conf_copy1 }}
48 {{- $context_values := omit $context.Values "conf" }}
49 - {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
50 + {{- $root_conf_copy3 := merge $context_values $root_conf_copy2 }}
51 {{- $root_conf_copy4 := dict "Values" $root_conf_copy3 }}
52 {{- $_ := set $context.Values.__default "nodeData" $root_conf_copy4 }}
54 @@ -198,7 +198,7 @@ limitations under the License.
55 {{- range $current_dict := $context.Values.__daemonset_list }}
57 {{- $context_novalues := omit $context "Values" }}
58 - {{- $merged_dict := mergeOverwrite $context_novalues $current_dict.nodeData }}
59 + {{- $merged_dict := merge $current_dict.nodeData $context_novalues }}
60 {{- $_ := set $current_dict "nodeData" $merged_dict }}
61 {{/* Deep copy original daemonset_yaml */}}
62 {{- $_ := set $context.Values "__daemonset_yaml" ($daemonset_yaml | toYaml | fromYaml) }}