From 96db1cb2f1e90bf7c3936dd76f99e3b8d7e92951 Mon Sep 17 00:00:00 2001 From: Sergiy Gavrylenko Date: Tue, 17 Aug 2021 23:14:07 +0300 Subject: [PATCH] feat(argocd-image-updater): Add custom environment variable Signed-off-by: Sergiy Gavrylenko --- charts/argocd-image-updater/templates/deployment.yaml | 6 ++++++ charts/argocd-image-updater/values.yaml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/charts/argocd-image-updater/templates/deployment.yaml b/charts/argocd-image-updater/templates/deployment.yaml index cfc350ec..bc473e93 100644 --- a/charts/argocd-image-updater/templates/deployment.yaml +++ b/charts/argocd-image-updater/templates/deployment.yaml @@ -51,6 +51,12 @@ spec: optional: true - name: IMAGE_UPDATER_LOGLEVEL value: {{ .Values.config.logLevel }} + {{- if .Values.config.customEnvVariables }} + {{- range $key, $value := .Values.config.customEnvVariables }} + - name: {{ $key }} + value: {{ $value | quote }} + {{- end }} + {{- end }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" diff --git a/charts/argocd-image-updater/values.yaml b/charts/argocd-image-updater/values.yaml index f939137c..d72d0098 100644 --- a/charts/argocd-image-updater/values.yaml +++ b/charts/argocd-image-updater/values.yaml @@ -39,6 +39,10 @@ config: # -- If specified, use an unencrypted HTTP connection to the ArgoCD API instead of TLS. plaintext: false + customEnvVariables: [] + # Add some custom variables e.g. set AWS region during retrieve the ECR token + # AWS_REGION: us-west-1 + # -- ArgoCD Image Update log level logLevel: "info"