From 79a9f127f71c25dbf1b57742cda3cd4dfb13f735 Mon Sep 17 00:00:00 2001 From: davidsauntson Date: Wed, 5 Feb 2025 14:35:53 +0000 Subject: [PATCH] fix: use sha in env vars --- infrastructure/app/chart/energy-apps/templates/deployment.yaml | 2 ++ infrastructure/app/chart/energy-apps/values.yaml | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/infrastructure/app/chart/energy-apps/templates/deployment.yaml b/infrastructure/app/chart/energy-apps/templates/deployment.yaml index 1952144c..4dad3616 100644 --- a/infrastructure/app/chart/energy-apps/templates/deployment.yaml +++ b/infrastructure/app/chart/energy-apps/templates/deployment.yaml @@ -51,6 +51,8 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: + - name: + value: {{ .Values.image.tag }} {{- if .Values.envVars }} {{- range $name, $val := .Values.envVars }} - name: {{ $name }} diff --git a/infrastructure/app/chart/energy-apps/values.yaml b/infrastructure/app/chart/energy-apps/values.yaml index 2201dae5..1697ed7c 100644 --- a/infrastructure/app/chart/energy-apps/values.yaml +++ b/infrastructure/app/chart/energy-apps/values.yaml @@ -10,8 +10,7 @@ image: tag: "main" # plain env vars. Take precedence over any secrets with the same name! -envVars: - APP_VERSION: {{ .Values.image.tag }} +envVars: {} # values to store in a secret. Only intended to be set with helm --set at e.g. deployment time!! secrets: