From fdfd5d36eb49796c00ceeffd308d2c6fede35f61 Mon Sep 17 00:00:00 2001 From: hintofbasil Date: Mon, 8 Jun 2020 17:23:48 +0100 Subject: [PATCH] [stable/coredns] Allow extra volumes and mounts (#22685) Signed-off-by: William Hutcheson Co-authored-by: William Hutcheson --- stable/coredns/Chart.yaml | 2 +- stable/coredns/README.md | 2 ++ stable/coredns/templates/deployment.yaml | 6 ++++++ stable/coredns/values.yaml | 9 +++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/stable/coredns/Chart.yaml b/stable/coredns/Chart.yaml index 4f59774c63..98d2cac50c 100644 --- a/stable/coredns/Chart.yaml +++ b/stable/coredns/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: coredns -version: 1.11.0 +version: 1.12.0 appVersion: 1.6.9 description: CoreDNS is a DNS server that chains plugins and provides Kubernetes DNS Services keywords: diff --git a/stable/coredns/README.md b/stable/coredns/README.md index 56b1af51a3..97928aeae3 100644 --- a/stable/coredns/README.md +++ b/stable/coredns/README.md @@ -73,6 +73,8 @@ The command removes all the Kubernetes components associated with the chart and | `nodeSelector` | Node labels for pod assignment | {} | | `tolerations` | Tolerations for pod assignment | [] | | `zoneFiles` | Configure custom Zone files | [] | +| `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 | [] | | `customLabels` | Optional labels for Deployment(s), Pod, Service, ServiceMonitor objects | {} | | `podDisruptionBudget` | Optional PodDisruptionBudget | {} | diff --git a/stable/coredns/templates/deployment.yaml b/stable/coredns/templates/deployment.yaml index 11db35a0f6..0ed8445151 100644 --- a/stable/coredns/templates/deployment.yaml +++ b/stable/coredns/templates/deployment.yaml @@ -80,6 +80,9 @@ spec: - name: {{ .name }} mountPath: {{ .mountPath }} readOnly: true +{{- end }} +{{- if .Values.extraVolumeMounts }} +{{- toYaml .Values.extraVolumeMounts | nindent 8}} {{- end }} resources: {{ toYaml .Values.resources | indent 10 }} @@ -120,3 +123,6 @@ spec: secretName: {{ .name }} defaultMode: 400 {{- end }} +{{- if .Values.extraVolumes }} +{{ toYaml .Values.extraVolumes | indent 8 }} +{{- end }} diff --git a/stable/coredns/values.yaml b/stable/coredns/values.yaml index cb7178d6eb..e976b7f716 100644 --- a/stable/coredns/values.yaml +++ b/stable/coredns/values.yaml @@ -142,6 +142,15 @@ zoneFiles: [] # example.com. IN A 192.168.99.102 # *.example.com. IN A 192.168.99.102 +# optional array of extra volumes to create +extraVolumes: [] +# - name: some-volume-name +# emptyDir: {} +# optional array of mount points for extraVolumes +extraVolumeMounts: [] +# - name: some-volume-name +# mountPath: /etc/wherever + # optional array of secrets to mount inside coredns container # possible usecase: need for secure connection with etcd backend extraSecrets: []