helm - fix issue for helm command when chart contains space into its name (#657)

* fix issue for helm command when chart contains space into its name
This commit is contained in:
Bikouo Aubin
2023-11-13 11:48:13 +01:00
committed by GitHub
parent b066a2dda3
commit b44fdd3f05
7 changed files with 113 additions and 45 deletions

View File

@@ -472,7 +472,7 @@ def run_dep_update(module, chart_ref):
"""
Run dependency update
"""
dep_update = module.get_helm_binary() + " dependency update " + chart_ref
dep_update = module.get_helm_binary() + f" dependency update '{chart_ref}'"
rc, out, err = module.run_helm_command(dep_update)
@@ -480,7 +480,7 @@ def fetch_chart_info(module, command, chart_ref):
"""
Get chart info
"""
inspect_command = command + " show chart " + chart_ref
inspect_command = command + f" show chart '{chart_ref}'"
rc, out, err = module.run_helm_command(inspect_command)
@@ -572,7 +572,7 @@ def deploy(
if set_value_args:
deploy_command += " " + set_value_args
deploy_command += " " + release_name + " " + chart_name
deploy_command += " " + release_name + f" '{chart_name}'"
return deploy_command