Skip to content

Commit 684e9bb

Browse files
steluczlukasstehlikeset
authored andcommitted
rework to be able to specify secret name
1 parent c156a14 commit 684e9bb

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ The default values set by the application itself can be confirmed [here](https:/
231231
| `externalManagedTags` | Specifies the list of tag keys on AWS resources that are managed externally | `[]` |
232232
| `livenessProbe` | Liveness probe settings for the controller | (see `values.yaml`) |
233233
| `env` | Environment variables to set for aws-load-balancer-controller pod | None |
234-
| `envFromSecret` | If `true`, use Environment variables from Secret (aws-secret) for aws-load-balancer-controller pod similarly as The EBS CSI Driver does. | `false` |
234+
| `envSecretName` | Environment variables credentials from Secret (aws-secret) for aws-load-balancer-controller pod similarly as The EBS CSI Driver does. | `false` |
235235
| `hostNetwork` | If `true`, use hostNetwork | `false` |
236236
| `dnsPolicy` | Set dnsPolicy if required | `ClusterFirst` |
237237
| `extraVolumeMounts` | Extra volume mounts for the pod | `[]` |

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,25 +149,25 @@ spec:
149149
{{- if ne .Values.defaultTargetType "instance" }}
150150
- --default-target-type={{ .Values.defaultTargetType }}
151151
{{- end }}
152-
{{- if or .Values.env (.Values.envFromSecret | default false) }}
152+
{{- if or .Values.env .Values.envSecretName }}
153153
env:
154154
{{- if .Values.env}}
155155
{{- range $key, $value := .Values.env }}
156156
- name: {{ $key }}
157157
value: "{{ $value }}"
158158
{{- end }}
159159
{{- end }}
160-
{{- if .Values.envFromSecret | default false }}
160+
{{- if .Values.envSecretName }}
161161
- name: AWS_ACCESS_KEY_ID
162162
valueFrom:
163163
secretKeyRef:
164-
name: aws-secret
164+
name: {{ .Values.envSecretName }}
165165
key: key_id
166166
optional: true
167167
- name: AWS_SECRET_ACCESS_KEY
168168
valueFrom:
169169
secretKeyRef:
170-
name: aws-secret
170+
name: {{ .Values.envSecretName }}
171171
key: access_key
172172
optional: true
173173
{{- end }}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ env:
247247
# ENV_1: ""
248248
# ENV_2: ""
249249

250-
# Use Environment variables from Secret (aws-secret) for aws-load-balancer-controller pod similarly as The EBS CSI Driver does.
251-
# envFromSecret: true
250+
# Use Environment variables credentials from Secret (aws-secret) for aws-load-balancer-controller pod similarly as The EBS CSI Driver does.
251+
# envSecretName: aws-secret
252252

253253
# Specifies if aws-load-balancer-controller should be started in hostNetwork mode.
254254
#

0 commit comments

Comments
 (0)