Skip to content

Commit

Permalink
Merge pull request #44 from RuriRyan/feat/moar_custom_config
Browse files Browse the repository at this point in the history
Allow to add extra config to the default Corefile
  • Loading branch information
haad authored Nov 8, 2021
2 parents 70519f7 + 78568c8 commit 4f13be4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/coredns/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 3 additions & 0 deletions charts/coredns/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Expand Down
7 changes: 7 additions & 0 deletions charts/coredns/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4f13be4

Please sign in to comment.