Skip to content

Commit df2d52d

Browse files
edwarddohRipolin
authored andcommitted
Add environment variables on container specs
Signed-off-by: Ed Doh <[email protected]>
1 parent b49816a commit df2d52d

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

charts/coredns/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ The command removes all the Kubernetes components associated with the chart and
103103
| `extraVolumes` | Optional array of volumes to create | [] |
104104
| `extraVolumeMounts` | Optional array of volumes to mount inside the CoreDNS container | [] |
105105
| `extraSecrets` | Optional array of secrets to mount inside the CoreDNS container | [] |
106+
| `env` | Optional array of environment variables for CoreDNS container | [] |
106107
| `customLabels` | Optional labels for Deployment(s), Pod, Service, ServiceMonitor objects | {} |
107108
| `customAnnotations` | Optional annotations for Deployment(s), Pod, Service, ServiceMonitor objects |
108109
| `rollingUpdate.maxUnavailable` | Maximum number of unavailable replicas during rolling update | `1` |

charts/coredns/templates/deployment.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ spec:
107107
{{- end }}
108108
{{- if .Values.extraVolumeMounts }}
109109
{{- toYaml .Values.extraVolumeMounts | nindent 8}}
110+
{{- end }}
111+
{{- if .Values.env }}
112+
env:
113+
{{- toYaml .Values.env | nindent 10}}
110114
{{- end }}
111115
resources:
112116
{{ toYaml .Values.resources | indent 10 }}

charts/coredns/values.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,17 @@ extraSecrets: []
259259
# mountPath: /etc/wherever
260260
# defaultMode: 440
261261

262+
# optional array of environment variables for coredns container
263+
# possible usecase: provides username and password for etcd user authentications
264+
env: []
265+
# - name: WHATEVER_ENV
266+
# value: whatever
267+
# - name: SOME_SECRET_ENV
268+
# valueFrom:
269+
# secretKeyRef:
270+
# name: some-secret-name
271+
# key: secret-key
272+
262273
# To support legacy deployments using CoreDNS with the "k8s-app: kube-dns" label selectors.
263274
# See https://github.com/coredns/helm/blob/master/charts/coredns/README.md#adopting-existing-coredns-resources
264275
# k8sAppLabelOverride: "kube-dns"

0 commit comments

Comments
 (0)