fix host-specific overrides incorrectly overwriting previous values

root_conf area is used for host-specific configuration and overwritten in
each round of loop. It causes that all hosts will share same properties.
This makes use each host's own area in the loop.

Task: 34282
Story: 2005936

Change-Id: I0afb0b32ab80456aa3439b4221f2a95ca05ddf24
This commit is contained in:
Jugwan Eom 2019-06-24 06:33:11 +00:00
parent 9e95a497c0
commit 833d426da8
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ limitations under the License.
{{/* apply overrides */}} {{/* apply overrides */}}
{{- $override_conf_copy := $host_data.conf }} {{- $override_conf_copy := $host_data.conf }}
{{- $root_conf_copy := omit $context.Values.conf "overrides" }} {{- $root_conf_copy := omit $context.Values.conf "overrides" }}
{{- $merged_dict := mergeOverwrite $root_conf_copy $override_conf_copy }} {{- $merged_dict := merge $override_conf_copy $root_conf_copy }}
{{- $root_conf_copy2 := dict "conf" $merged_dict }} {{- $root_conf_copy2 := dict "conf" $merged_dict }}
{{- $context_values := omit $context.Values "conf" }} {{- $context_values := omit $context.Values "conf" }}
{{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }} {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
@ -93,7 +93,7 @@ limitations under the License.
{{/* apply overrides */}} {{/* apply overrides */}}
{{- $override_conf_copy := $label_data.conf }} {{- $override_conf_copy := $label_data.conf }}
{{- $root_conf_copy := omit $context.Values.conf "overrides" }} {{- $root_conf_copy := omit $context.Values.conf "overrides" }}
{{- $merged_dict := mergeOverwrite $root_conf_copy $override_conf_copy }} {{- $merged_dict := merge $override_conf_copy $root_conf_copy }}
{{- $root_conf_copy2 := dict "conf" $merged_dict }} {{- $root_conf_copy2 := dict "conf" $merged_dict }}
{{- $context_values := omit $context.Values "conf" }} {{- $context_values := omit $context.Values "conf" }}
{{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }} {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}

View File

@ -48,7 +48,7 @@ limitations under the License.
{{/* apply overrides */}} {{/* apply overrides */}}
{{- $override_conf_copy := $host_data.conf }} {{- $override_conf_copy := $host_data.conf }}
{{- $root_conf_copy := omit $context.Values.conf "overrides" }} {{- $root_conf_copy := omit $context.Values.conf "overrides" }}
{{- $merged_dict := mergeOverwrite $root_conf_copy $override_conf_copy }} {{- $merged_dict := merge $override_conf_copy $root_conf_copy }}
{{- $root_conf_copy2 := dict "conf" $merged_dict }} {{- $root_conf_copy2 := dict "conf" $merged_dict }}
{{- $context_values := omit $context.Values "conf" }} {{- $context_values := omit $context.Values "conf" }}
{{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }} {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}
@ -87,7 +87,7 @@ limitations under the License.
{{/* apply overrides */}} {{/* apply overrides */}}
{{- $override_conf_copy := $label_data.conf }} {{- $override_conf_copy := $label_data.conf }}
{{- $root_conf_copy := omit $context.Values.conf "overrides" }} {{- $root_conf_copy := omit $context.Values.conf "overrides" }}
{{- $merged_dict := mergeOverwrite $root_conf_copy $override_conf_copy }} {{- $merged_dict := merge $override_conf_copy $root_conf_copy }}
{{- $root_conf_copy2 := dict "conf" $merged_dict }} {{- $root_conf_copy2 := dict "conf" $merged_dict }}
{{- $context_values := omit $context.Values "conf" }} {{- $context_values := omit $context.Values "conf" }}
{{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }} {{- $root_conf_copy3 := mergeOverwrite $context_values $root_conf_copy2 }}