mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-26 21:33:02 +00:00
helm_template: change order of values_release and values_files (#373)
helm_template: change order of values_release and values_files SUMMARY This fix aligns precedence of release_values and values_files in kubernetes.core.helm_template with the one in kubernetes.core.helm. The values in release_values are now processed last, thus with the highest precedence. This allows overwriting of values in values_files with the values presented in release_values. ISSUE TYPE Bugfix Pull Request COMPONENT NAME changelogs/fragments/348-helm_template-fix-precedence-of-release-values-over-values-files.yaml plugins/modules/helm_template.py tests/unit/modules/test_helm_template.py
This commit is contained in:
@@ -152,16 +152,16 @@ def template(
|
||||
if output_dir:
|
||||
cmd += " --output-dir=" + output_dir
|
||||
|
||||
if values_files:
|
||||
for values_file in values_files:
|
||||
cmd += " -f=" + values_file
|
||||
|
||||
if release_values:
|
||||
fd, path = tempfile.mkstemp(suffix=".yml")
|
||||
with open(path, "w") as yaml_file:
|
||||
yaml.dump(release_values, yaml_file, default_flow_style=False)
|
||||
cmd += " -f=" + path
|
||||
|
||||
if values_files:
|
||||
for values_file in values_files:
|
||||
cmd += " -f=" + values_file
|
||||
|
||||
if include_crds:
|
||||
cmd += " --include-crds"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user