From f6eaf7e2c1eff8cb52092a70d9b5bb7f791a0fd3 Mon Sep 17 00:00:00 2001 From: Christoph Manns Date: Wed, 20 Oct 2021 17:00:26 +0200 Subject: [PATCH 1/2] Allow to add extra config to the default Corefile With this change it is possible to extra/custom config options outside of the zones block which enables some further/advanced customization. Signed-off-by: Christoph Manns --- charts/coredns/templates/configmap.yaml | 3 +++ charts/coredns/values.yaml | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/charts/coredns/templates/configmap.yaml b/charts/coredns/templates/configmap.yaml index ebbea9b..64bfe4f 100644 --- a/charts/coredns/templates/configmap.yaml +++ b/charts/coredns/templates/configmap.yaml @@ -19,6 +19,9 @@ metadata: {{- end }} data: Corefile: |- + {{- range $name, $conf := .Values.extraConfig }} + {{ $name }}{{ if $conf.parameters }} {{ $conf.parameters }}{{ end }} + {{- end }} {{ range .Values.servers }} {{- range $idx, $zone := .zones }}{{ if $idx }} {{ else }}{{ end }}{{ default "" $zone.scheme }}{{ default "." $zone.zone }}{{ else }}.{{ end -}} {{- if .port }}:{{ .port }} {{ end -}} diff --git a/charts/coredns/values.yaml b/charts/coredns/values.yaml index c952736..3d321e5 100644 --- a/charts/coredns/values.yaml +++ b/charts/coredns/values.yaml @@ -144,6 +144,13 @@ servers: # hello world # foo bar +# Extra configuration that is applied outside of the default zone block. +# Example to include additional config files, which may come from extraVolumes: +# extraConfig: +# import: +# parameters: /opt/coredns/*.conf +extraConfig: {} + # To use the livenessProbe, the health plugin needs to be enabled in CoreDNS' server config livenessProbe: enabled: true From 78568c84085d421ecf5c0cc98ec546c0a2d85992 Mon Sep 17 00:00:00 2001 From: Christoph Manns Date: Mon, 25 Oct 2021 10:30:08 +0200 Subject: [PATCH 2/2] Bump chart version Signed-off-by: Christoph Manns --- charts/coredns/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/coredns/Chart.yaml b/charts/coredns/Chart.yaml index 13dca33..ebd9637 100644 --- a/charts/coredns/Chart.yaml +++ b/charts/coredns/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: coredns -version: 1.16.3 +version: 1.16.4 appVersion: 1.8.4 home: https://coredns.io icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png