From cd2d4d180e9357fe56b4414618f2830361f8dbdd Mon Sep 17 00:00:00 2001 From: Huong Nguyen Date: Thu, 11 Jul 2024 22:29:05 +0700 Subject: [PATCH] Move envFrom to the correct position and update example --- .../templates/deployment.yaml | 9 +++++---- helm/aws-load-balancer-controller/values.yaml | 7 +++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/helm/aws-load-balancer-controller/templates/deployment.yaml b/helm/aws-load-balancer-controller/templates/deployment.yaml index 70fe8d5ca0..da672ab34d 100644 --- a/helm/aws-load-balancer-controller/templates/deployment.yaml +++ b/helm/aws-load-balancer-controller/templates/deployment.yaml @@ -170,7 +170,7 @@ spec: {{- if .Values.loadBalancerClass }} - --load-balancer-class={{ .Values.loadBalancerClass }} {{- end }} - {{- if or .Values.env .Values.envSecretName .Values.envFrom }} + {{- if or .Values.env .Values.envSecretName }} env: {{- if .Values.env}} {{- range $key, $value := .Values.env }} @@ -178,9 +178,6 @@ spec: value: "{{ $value }}" {{- end }} {{- end }} - {{- if .Values.envFrom }} - {{ .Values.envFrom | toYaml | nindent 8 }} - {{- end }} {{- if .Values.envSecretName }} - name: AWS_ACCESS_KEY_ID valueFrom: @@ -196,6 +193,10 @@ spec: optional: true {{- end }} {{- end }} + {{- if .Values.envFrom }} + envFrom: + {{- toYaml .Values.envFrom | nindent 10 }} + {{- end }} securityContext: {{- toYaml .Values.securityContext | nindent 10 }} image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" diff --git a/helm/aws-load-balancer-controller/values.yaml b/helm/aws-load-balancer-controller/values.yaml index df9f360ae6..96e0466e14 100644 --- a/helm/aws-load-balancer-controller/values.yaml +++ b/helm/aws-load-balancer-controller/values.yaml @@ -282,10 +282,9 @@ env: # envSecretName: aws-secret # Use envFrom to set environment variables from a Secret or ConfigMap -envFrom: - # valueFrom: - # - secretKeyRef: - # name: aws-load-balancer-controller +# envFrom: +# - secretRef: +# name: my-secret # Specifies if aws-load-balancer-controller should be started in hostNetwork mode. # This is required if using a custom CNI where the managed control plane nodes are unable to initiate