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

[v0.14.x] Always create dnsmasq-node-coredns-local.yaml #1902

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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