diff --git a/helm/aws-load-balancer-controller/README.md b/helm/aws-load-balancer-controller/README.md index 56aae3d8d..775898e26 100644 --- a/helm/aws-load-balancer-controller/README.md +++ b/helm/aws-load-balancer-controller/README.md @@ -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` | diff --git a/helm/aws-load-balancer-controller/templates/deployment.yaml b/helm/aws-load-balancer-controller/templates/deployment.yaml index ab0c69649..70fe8d5ca 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 }} + {{- if or .Values.env .Values.envSecretName .Values.envFrom }} env: {{- if .Values.env}} {{- range $key, $value := .Values.env }} @@ -178,6 +178,9 @@ spec: value: "{{ $value }}" {{- end }} {{- end }} + {{- if .Values.envFrom }} + {{ .Values.envFrom | toYaml | nindent 8 }} + {{- end }} {{- if .Values.envSecretName }} - name: AWS_ACCESS_KEY_ID valueFrom: diff --git a/helm/aws-load-balancer-controller/values.yaml b/helm/aws-load-balancer-controller/values.yaml index 07f5f0a6f..df9f360ae 100644 --- a/helm/aws-load-balancer-controller/values.yaml +++ b/helm/aws-load-balancer-controller/values.yaml @@ -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.