Skip to content

Commit 51c1365

Browse files
authored
Added helm envFrom value parameter for cluster-name (#3683)
* Added helm envFrom value parameter for cluster-name * Update README.md file * Add envFrom configuration to values.yaml * Remove empty line in values.yaml
1 parent b389ac9 commit 51c1365

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

helm/aws-load-balancer-controller/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ The default values set by the application itself can be confirmed [here](https:/
243243
| `externalManagedTags` | Specifies the list of tag keys on AWS resources that are managed externally | `[]` |
244244
| `livenessProbe` | Liveness probe settings for the controller | (see `values.yaml`) |
245245
| `env` | Environment variables to set for aws-load-balancer-controller pod | None |
246+
| `envFrom` | Environment variables to set for aws-load-balancer-controller pod from configMap or Secret | None |
247+
246248
| `envSecretName` | AWS credentials as environment variables from Secret (Secret keys `key_id` and `access_key`). | None |
247249
| `hostNetwork` | If `true`, use hostNetwork | `false` |
248250
| `dnsPolicy` | Set dnsPolicy if required | `ClusterFirst` |

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,14 +170,17 @@ spec:
170170
{{- if .Values.loadBalancerClass }}
171171
- --load-balancer-class={{ .Values.loadBalancerClass }}
172172
{{- end }}
173-
{{- if or .Values.env .Values.envSecretName }}
173+
{{- if or .Values.env .Values.envSecretName .Values.envFrom }}
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 }}
181184
{{- if .Values.envSecretName }}
182185
- name: AWS_ACCESS_KEY_ID
183186
valueFrom:

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,8 +281,13 @@ env:
281281
# Use Environment variables credentials from Secret (aws-secret) for aws-load-balancer-controller pod similarly as The EBS CSI Driver does.
282282
# envSecretName: aws-secret
283283

284+
# Use envFrom to set environment variables from a Secret or ConfigMap
285+
envFrom:
286+
# valueFrom:
287+
# - secretKeyRef:
288+
# name: aws-load-balancer-controller
289+
284290
# Specifies if aws-load-balancer-controller should be started in hostNetwork mode.
285-
#
286291
# This is required if using a custom CNI where the managed control plane nodes are unable to initiate
287292
# network connections to the pods, for example using Calico CNI plugin on EKS. This is not required or
288293
# recommended if using the Amazon VPC CNI plugin.

0 commit comments

Comments
 (0)