From b0b39f807a918528ec8ab9c86f50d7ceff9b9ba0 Mon Sep 17 00:00:00 2001 From: Om Mishra <32200996+mishraomp@users.noreply.github.com> Date: Fri, 17 Nov 2023 13:35:03 -0800 Subject: [PATCH] fix(helm): tpl command fixes for args and commands in deployment. (#24) --- charts/component/Chart.yaml | 2 +- charts/component/templates/deployment.yaml | 6 +++--- charts/component/templates/hpa.yaml | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/charts/component/Chart.yaml b/charts/component/Chart.yaml index 636a7b4..04ee1be 100644 --- a/charts/component/Chart.yaml +++ b/charts/component/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.0.18 +version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/charts/component/templates/deployment.yaml b/charts/component/templates/deployment.yaml index 4e49057..818dcd2 100644 --- a/charts/component/templates/deployment.yaml +++ b/charts/component/templates/deployment.yaml @@ -58,13 +58,13 @@ spec: {{- if .command }} command: {{- range .command }} - - "{{tpl . .}}" + - "{{tpl . $}}" {{- end }} {{- end}} {{- if .args }} args: {{- range .args }} - - "{{ . }}" + - "{{tpl . $}}" {{- end }} {{- end }} {{- if .envFrom }} @@ -180,7 +180,7 @@ spec: {{- if .args }} args: {{- range .args }} - - "{{ . }}" + - "{{tpl . $}}" {{- end }} {{- end }} {{- if (contains "sha256:" .tag) }} diff --git a/charts/component/templates/hpa.yaml b/charts/component/templates/hpa.yaml index b5b2c8e..6115b09 100644 --- a/charts/component/templates/hpa.yaml +++ b/charts/component/templates/hpa.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.autoscaling .Values.autoscaling.enabled }} +{{- if and (.Values.global.autoscaling) (and .Values.autoscaling .Values.autoscaling.enabled) }} apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: @@ -35,3 +35,4 @@ spec: averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} +{{- end}}