Skip to content

Commit

Permalink
Add environment variables on container specs
Browse files Browse the repository at this point in the history
  • Loading branch information
edwarddoh committed Jan 14, 2023
1 parent 46af417 commit 4479897
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/coredns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ The command removes all the Kubernetes components associated with the chart and
| `extraVolumes` | Optional array of volumes to create | [] |
| `extraVolumeMounts` | Optional array of volumes to mount inside the CoreDNS container | [] |
| `extraSecrets` | Optional array of secrets to mount inside the CoreDNS container | [] |
| `env` | Optional array of environment variables for CoreDNS container | [] |
| `customLabels` | Optional labels for Deployment(s), Pod, Service, ServiceMonitor objects | {} |
| `customAnnotations` | Optional annotations for Deployment(s), Pod, Service, ServiceMonitor objects
| `rollingUpdate.maxUnavailable` | Maximum number of unavailable replicas during rolling update | `1` |
Expand Down
4 changes: 4 additions & 0 deletions charts/coredns/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ spec:
{{- end }}
{{- if .Values.extraVolumeMounts }}
{{- toYaml .Values.extraVolumeMounts | nindent 8}}
{{- end }}
{{- if .Values.env }}
env:
{{- toYaml .Values.env | nindent 10}}
{{- end }}
resources:
{{ toYaml .Values.resources | indent 10 }}
Expand Down
11 changes: 11 additions & 0 deletions charts/coredns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,17 @@ extraSecrets: []
# - name: some-fancy-secret
# mountPath: /etc/wherever

# optional array of environment variables for coredns container
# possible usecase: provides username and password for etcd user authentications
env: []
# - name: WHATEVER_ENV
# value: whatever
# - name: SOME_SECRET_ENV
# valueFrom:
# secretKeyRef:
# name: some-secret-name
# key: secret-key

# To support legacy deployments using CoreDNS with the "k8s-app: kube-dns" label selectors.
# See https://github.com/coredns/helm/blob/master/charts/coredns/README.md#adopting-existing-coredns-resources
# k8sAppLabelOverride: "kube-dns"
Expand Down

0 comments on commit 4479897

Please sign in to comment.