Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1902 from kfr2/v0.14.x-always-create-coredns-loca…
Browse files Browse the repository at this point in the history
…l-manifest

[v0.14.x] Always create dnsmasq-node-coredns-local.yaml
  • Loading branch information
dominicgunn authored Aug 25, 2020
2 parents 8d5fac7 + ecce43e commit 34bb80a
Showing 1 changed file with 36 additions and 38 deletions.
74 changes: 36 additions & 38 deletions builtin/files/userdata/cloud-config-controller
Original file line number Diff line number Diff line change
Expand Up @@ -3975,8 +3975,43 @@ write_files:
- --v=2
- --logtostderr

{{ if and .KubeDns.NodeLocalResolver .KubeDns.DNSMasq.CoreDNSLocal.Enabled }}
- path: /srv/kubernetes/manifests/dnsmasq-node-coredns-local.yaml
content: |
apiVersion: v1
kind: ConfigMap
metadata:
name: coredns-local
namespace: kube-system
labels:
application: coredns
data:
Corefile: |
{{- if and (eq .KubeDns.Provider "coredns") .KubeDns.AdditionalZoneCoreDNSConfig }}
{{ .KubeDns.AdditionalZoneCoreDNSConfig | indent 12 }}
{{- end }}

cluster.local:9254 {{ .PodCIDR }}:9254 {{ .ServiceCIDR }}:9254 {
errors
kubernetes {
pods insecure
}
cache 30
log svc.svc.cluster.local.
prometheus :9153
}

.:9254 {
errors
health :9154 # this is global for all servers
prometheus :9153
forward . /etc/resolv.conf
pprof 127.0.0.1:9156
cache 30
reload
}

{{ if .KubeDns.NodeLocalResolver }}
- path: /srv/kubernetes/manifests/dnsmasq-node-ds.yaml
content: |
apiVersion: v1
kind: ServiceAccount
Expand Down Expand Up @@ -4020,43 +4055,6 @@ write_files:
name: dnsmasq
namespace: kube-system
---
apiVersion: v1
kind: ConfigMap
metadata:
name: coredns-local
namespace: kube-system
labels:
application: coredns
data:
Corefile: |
{{- if and (eq .KubeDns.Provider "coredns") .KubeDns.AdditionalZoneCoreDNSConfig }}
{{ .KubeDns.AdditionalZoneCoreDNSConfig | indent 12 }}
{{- end }}

cluster.local:9254 {{ .PodCIDR }}:9254 {{ .ServiceCIDR }}:9254 {
errors
kubernetes {
pods insecure
}
cache 30
log svc.svc.cluster.local.
prometheus :9153
}

.:9254 {
errors
health :9154 # this is global for all servers
prometheus :9153
forward . /etc/resolv.conf
pprof 127.0.0.1:9156
cache 30
reload
}
{{ end }}

{{ if .KubeDns.NodeLocalResolver }}
- path: /srv/kubernetes/manifests/dnsmasq-node-ds.yaml
content: |
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
Expand Down

0 comments on commit 34bb80a

Please sign in to comment.