From c83aaf61424d233b34a9d5c0570abe1aac0a4d9d Mon Sep 17 00:00:00 2001 From: Sergiy Gavrylenko Date: Thu, 19 Aug 2021 00:31:26 +0300 Subject: [PATCH] feat(argocd-image-updater): Add custom environment variables into deployment 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..1723adc6 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"