Skip to content

Commit

Permalink
Added helm envFrom value parameter for cluster-name (#3683)
Browse files Browse the repository at this point in the history
* Added helm envFrom value parameter for cluster-name

* Update README.md file

* Add envFrom configuration to values.yaml

* Remove empty line in values.yaml
  • Loading branch information
omerap12 authored May 22, 2024
1 parent b389ac9 commit 51c1365
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions helm/aws-load-balancer-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ The default values set by the application itself can be confirmed [here](https:/
| `externalManagedTags` | Specifies the list of tag keys on AWS resources that are managed externally | `[]` |
| `livenessProbe` | Liveness probe settings for the controller | (see `values.yaml`) |
| `env` | Environment variables to set for aws-load-balancer-controller pod | None |
| `envFrom` | Environment variables to set for aws-load-balancer-controller pod from configMap or Secret | None |

| `envSecretName` | AWS credentials as environment variables from Secret (Secret keys `key_id` and `access_key`). | None |
| `hostNetwork` | If `true`, use hostNetwork | `false` |
| `dnsPolicy` | Set dnsPolicy if required | `ClusterFirst` |
Expand Down
5 changes: 4 additions & 1 deletion helm/aws-load-balancer-controller/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,17 @@ spec:
{{- if .Values.loadBalancerClass }}
- --load-balancer-class={{ .Values.loadBalancerClass }}
{{- end }}
{{- if or .Values.env .Values.envSecretName }}
{{- if or .Values.env .Values.envSecretName .Values.envFrom }}
env:
{{- if .Values.env}}
{{- range $key, $value := .Values.env }}
- name: {{ $key }}
value: "{{ $value }}"
{{- end }}
{{- end }}
{{- if .Values.envFrom }}
{{ .Values.envFrom | toYaml | nindent 8 }}
{{- end }}
{{- if .Values.envSecretName }}
- name: AWS_ACCESS_KEY_ID
valueFrom:
Expand Down
7 changes: 6 additions & 1 deletion helm/aws-load-balancer-controller/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,13 @@ env:
# Use Environment variables credentials from Secret (aws-secret) for aws-load-balancer-controller pod similarly as The EBS CSI Driver does.
# envSecretName: aws-secret

# Use envFrom to set environment variables from a Secret or ConfigMap
envFrom:
# valueFrom:
# - secretKeyRef:
# name: aws-load-balancer-controller

# 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
# network connections to the pods, for example using Calico CNI plugin on EKS. This is not required or
# recommended if using the Amazon VPC CNI plugin.
Expand Down

0 comments on commit 51c1365

Please sign in to comment.