Skip to content

Commit cb5271e

Browse files
authored
Merge pull request #3770 from huonguyenlt/feat/add-envFrom
Move envFrom to the correct position and update example
2 parents 9e2cbe7 + cd2d4d1 commit cb5271e

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

helm/aws-load-balancer-controller/templates/deployment.yaml

+5-4
Original file line numberDiff line numberDiff line change
@@ -170,17 +170,14 @@ spec:
170170
{{- if .Values.loadBalancerClass }}
171171
- --load-balancer-class={{ .Values.loadBalancerClass }}
172172
{{- end }}
173-
{{- if or .Values.env .Values.envSecretName .Values.envFrom }}
173+
{{- if or .Values.env .Values.envSecretName }}
174174
env:
175175
{{- if .Values.env}}
176176
{{- range $key, $value := .Values.env }}
177177
- name: {{ $key }}
178178
value: "{{ $value }}"
179179
{{- end }}
180180
{{- end }}
181-
{{- if .Values.envFrom }}
182-
{{ .Values.envFrom | toYaml | nindent 8 }}
183-
{{- end }}
184181
{{- if .Values.envSecretName }}
185182
- name: AWS_ACCESS_KEY_ID
186183
valueFrom:
@@ -196,6 +193,10 @@ spec:
196193
optional: true
197194
{{- end }}
198195
{{- end }}
196+
{{- if .Values.envFrom }}
197+
envFrom:
198+
{{- toYaml .Values.envFrom | nindent 10 }}
199+
{{- end }}
199200
securityContext:
200201
{{- toYaml .Values.securityContext | nindent 10 }}
201202
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"

helm/aws-load-balancer-controller/values.yaml

+3-4
Original file line numberDiff line numberDiff line change
@@ -282,10 +282,9 @@ env:
282282
# envSecretName: aws-secret
283283

284284
# Use envFrom to set environment variables from a Secret or ConfigMap
285-
envFrom:
286-
# valueFrom:
287-
# - secretKeyRef:
288-
# name: aws-load-balancer-controller
285+
# envFrom:
286+
# - secretRef:
287+
# name: my-secret
289288

290289
# Specifies if aws-load-balancer-controller should be started in hostNetwork mode.
291290
# This is required if using a custom CNI where the managed control plane nodes are unable to initiate

0 commit comments

Comments
 (0)