From c987de96060b0f17c19edb7126bc937dd2b9cd86 Mon Sep 17 00:00:00 2001 From: Jose Rojas <39174181+jarojasm95@users.noreply.github.com> Date: Mon, 28 Oct 2024 08:13:15 -0600 Subject: [PATCH] feat: Include all values in `helm-values` & `deploy` commands (#181) --- aladdin/charts/merger/templates/values.yaml | 2 +- aladdin/commands/helm_values.py | 3 ++- aladdin/lib/k8s/helm.py | 3 +++ pyproject.toml | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/aladdin/charts/merger/templates/values.yaml b/aladdin/charts/merger/templates/values.yaml index ea17f1c..79fe465 100644 --- a/aladdin/charts/merger/templates/values.yaml +++ b/aladdin/charts/merger/templates/values.yaml @@ -2,7 +2,7 @@ {{- $valuesYaml := toYaml .Values }} {{- $values := .Values }} {{- range untilStep 0 (int $templateValues) 1 }} - {{- $valuesYaml = tpl $valuesYaml (dict "Values" $values "Chart" $.Chart) }} + {{- $valuesYaml = tpl $valuesYaml (dict "Values" $values "Chart" $.Chart "Release" $.Release) }} {{- $values = fromYaml $valuesYaml }} {{- end }} {{- $valuesYaml }} diff --git a/aladdin/commands/helm_values.py b/aladdin/commands/helm_values.py index ba8c189..777cc41 100644 --- a/aladdin/commands/helm_values.py +++ b/aladdin/commands/helm_values.py @@ -42,6 +42,7 @@ def parse_args(sub_parser): help="show all values, including default values", dest="all_values", action="store_true", + default=True, ) parser.add_argument( "-o", @@ -59,7 +60,7 @@ def helm_values( uri: str, git_ref: str = None, chart: str = None, - all_values: bool = False, + all_values: bool = True, output: str = None, ): uri = urlparse(uri) diff --git a/aladdin/lib/k8s/helm.py b/aladdin/lib/k8s/helm.py index 67b77e8..8b9a374 100644 --- a/aladdin/lib/k8s/helm.py +++ b/aladdin/lib/k8s/helm.py @@ -133,6 +133,7 @@ def upgrade( force=False, dry_run=False, helm_args: list = None, + all_values=True, **values, ): if helm_args is None: @@ -148,6 +149,8 @@ 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 diff --git a/pyproject.toml b/pyproject.toml index 593436e..9575be5 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "aladdin" -version = "1.29.8.6" +version = "1.29.8.7" description = "" authors = ["Fivestars "] include = [