Skip to content

Commit e568719

Browse files
authored
MINOR: haproxy: Adds envFrom to Deployment and Deamonset (#252)
* Add envFrom to the HA deployment * Add envFrom to the HA daemonset * Update the description
1 parent fb8af0e commit e568719

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

haproxy/templates/daemonset.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ spec:
141141
env:
142142
{{- toYaml . | trim | nindent 12 }}
143143
{{- end }}
144+
{ { - with .Values.extraEnvFrom } }
145+
envFrom:
146+
{ { - toYaml . | trim | nindent 12 } }
147+
{ { - end } }
144148
resources:
145149
{{- toYaml .Values.resources | nindent 12 }}
146150
{{- if .Values.lifecycle }}

haproxy/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ spec:
139139
env:
140140
{{- toYaml . | trim | nindent 12 }}
141141
{{- end }}
142+
{ { - with .Values.extraEnvFrom } }
143+
envFrom:
144+
{ { - toYaml . | trim | nindent 12 } }
145+
{ { - end } }
142146
resources:
143147
{{- toYaml .Values.resources | nindent 12 }}
144148
{{- if .Values.lifecycle }}

haproxy/values.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,13 @@ extraEnvs: []
197197
# fieldRef:
198198
# fieldPath: status.podIP
199199

200+
## Use envFrom to add env vars from a secret or configmap to the HA Proxy container
201+
## ref: https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/
202+
extraEnvFrom: []
203+
## Example passing the pod IP into a container
204+
# - configMapRef:
205+
# name: ha-env-config
206+
200207
## Additional volumeMounts to the controller main container
201208
extraVolumeMounts: []
202209
## Example empty volume mounts when using securityContext->readOnlyRootFilesystem

0 commit comments

Comments
 (0)