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

Commit 34bb80a

Browse files
authored
Merge pull request #1902 from kfr2/v0.14.x-always-create-coredns-local-manifest
[v0.14.x] Always create dnsmasq-node-coredns-local.yaml
2 parents 8d5fac7 + ecce43e commit 34bb80a

File tree

1 file changed

+36
-38
lines changed

1 file changed

+36
-38
lines changed

builtin/files/userdata/cloud-config-controller

+36-38
Original file line numberDiff line numberDiff line change
@@ -3975,8 +3975,43 @@ write_files:
39753975
- --v=2
39763976
- --logtostderr
39773977

3978-
{{ if and .KubeDns.NodeLocalResolver .KubeDns.DNSMasq.CoreDNSLocal.Enabled }}
39793978
- path: /srv/kubernetes/manifests/dnsmasq-node-coredns-local.yaml
3979+
content: |
3980+
apiVersion: v1
3981+
kind: ConfigMap
3982+
metadata:
3983+
name: coredns-local
3984+
namespace: kube-system
3985+
labels:
3986+
application: coredns
3987+
data:
3988+
Corefile: |
3989+
{{- if and (eq .KubeDns.Provider "coredns") .KubeDns.AdditionalZoneCoreDNSConfig }}
3990+
{{ .KubeDns.AdditionalZoneCoreDNSConfig | indent 12 }}
3991+
{{- end }}
3992+
3993+
cluster.local:9254 {{ .PodCIDR }}:9254 {{ .ServiceCIDR }}:9254 {
3994+
errors
3995+
kubernetes {
3996+
pods insecure
3997+
}
3998+
cache 30
3999+
log svc.svc.cluster.local.
4000+
prometheus :9153
4001+
}
4002+
4003+
.:9254 {
4004+
errors
4005+
health :9154 # this is global for all servers
4006+
prometheus :9153
4007+
forward . /etc/resolv.conf
4008+
pprof 127.0.0.1:9156
4009+
cache 30
4010+
reload
4011+
}
4012+
4013+
{{ if .KubeDns.NodeLocalResolver }}
4014+
- path: /srv/kubernetes/manifests/dnsmasq-node-ds.yaml
39804015
content: |
39814016
apiVersion: v1
39824017
kind: ServiceAccount
@@ -4020,43 +4055,6 @@ write_files:
40204055
name: dnsmasq
40214056
namespace: kube-system
40224057
---
4023-
apiVersion: v1
4024-
kind: ConfigMap
4025-
metadata:
4026-
name: coredns-local
4027-
namespace: kube-system
4028-
labels:
4029-
application: coredns
4030-
data:
4031-
Corefile: |
4032-
{{- if and (eq .KubeDns.Provider "coredns") .KubeDns.AdditionalZoneCoreDNSConfig }}
4033-
{{ .KubeDns.AdditionalZoneCoreDNSConfig | indent 12 }}
4034-
{{- end }}
4035-
4036-
cluster.local:9254 {{ .PodCIDR }}:9254 {{ .ServiceCIDR }}:9254 {
4037-
errors
4038-
kubernetes {
4039-
pods insecure
4040-
}
4041-
cache 30
4042-
log svc.svc.cluster.local.
4043-
prometheus :9153
4044-
}
4045-
4046-
.:9254 {
4047-
errors
4048-
health :9154 # this is global for all servers
4049-
prometheus :9153
4050-
forward . /etc/resolv.conf
4051-
pprof 127.0.0.1:9156
4052-
cache 30
4053-
reload
4054-
}
4055-
{{ end }}
4056-
4057-
{{ if .KubeDns.NodeLocalResolver }}
4058-
- path: /srv/kubernetes/manifests/dnsmasq-node-ds.yaml
4059-
content: |
40604058
apiVersion: extensions/v1beta1
40614059
kind: DaemonSet
40624060
metadata:

0 commit comments

Comments
 (0)