Skip to content

Commit

Permalink
Merge pull request #178 from Ripolin/add-env
Browse files Browse the repository at this point in the history
Add environment variables on container specs
  • Loading branch information
hagaibarel authored Oct 9, 2024
2 parents b49816a + 892b8af commit 7b685ba
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charts/coredns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: coredns
version: 1.35.1
version: 1.36.0
appVersion: 1.11.3
home: https://coredns.io
icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png
Expand All @@ -20,4 +20,4 @@ type: application
annotations:
artifacthub.io/changes: |
- kind: changed
description: Move `trafficDistribution` key to correct path
description: Add environment variables on container specs
1 change: 1 addition & 0 deletions charts/coredns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,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 @@ -107,6 +107,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 @@ -259,6 +259,17 @@ extraSecrets: []
# mountPath: /etc/wherever
# defaultMode: 440

# 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 7b685ba

Please sign in to comment.