Skip to content

Commit

Permalink
cleanup deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
jarojasm95 committed Nov 5, 2024
1 parent 28aa4dd commit 749f1ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
1 change: 0 additions & 1 deletion aladdin/commands/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ def deploy(
helm.upgrade(
HelmRules.get_release_name(chart),
helm_chart_path,
[],
namespace,
force=force_helm,
dry_run=dry_run,
Expand Down
12 changes: 5 additions & 7 deletions aladdin/lib/k8s/helm.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,10 @@ def upgrade(
self,
release_name: str,
chart_path: str,
values_files: List[str],
namespace: str,
force=False,
dry_run=False,
helm_args: list = None,
all_values=True,
**values,
):
if helm_args is None:
Expand All @@ -149,12 +147,12 @@ def upgrade(
"--install",
f"--namespace={namespace}",
]
if all_values:
command.append(f"--values={chart_path}/values.yaml")

command = self.prepare_command(
command, chart_path, values_files, namespace, helm_args=helm_args, **values
)
for set_name, set_val in values.items():
command.extend(["--set", "{}={}".format(set_name, set_val)])

if helm_args:
command.extend(helm_args)

logger.info("Executing: %s", " ".join(command))
return subprocess.run(["helm", *command], check=True)
Expand Down

0 comments on commit 749f1ce

Please sign in to comment.