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

Commit ecce43e

Browse files
committed
Create dnsmasq-node's ServiceAccount if it is enabled
This ServiceAccount must exist whether or not CoreDNS-local has been enabled. Therefore, it is created alongside the DaemonSet rather than as part of the coredns-local manifest.
1 parent 6069681 commit ecce43e

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

builtin/files/userdata/cloud-config-controller

+36-36
Original file line numberDiff line numberDiff line change
@@ -3976,6 +3976,42 @@ write_files:
39763976
- --logtostderr
39773977

39783978
- 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
39794015
content: |
39804016
apiVersion: v1
39814017
kind: ServiceAccount
@@ -4019,42 +4055,6 @@ write_files:
40194055
name: dnsmasq
40204056
namespace: kube-system
40214057
---
4022-
apiVersion: v1
4023-
kind: ConfigMap
4024-
metadata:
4025-
name: coredns-local
4026-
namespace: kube-system
4027-
labels:
4028-
application: coredns
4029-
data:
4030-
Corefile: |
4031-
{{- if and (eq .KubeDns.Provider "coredns") .KubeDns.AdditionalZoneCoreDNSConfig }}
4032-
{{ .KubeDns.AdditionalZoneCoreDNSConfig | indent 12 }}
4033-
{{- end }}
4034-
4035-
cluster.local:9254 {{ .PodCIDR }}:9254 {{ .ServiceCIDR }}:9254 {
4036-
errors
4037-
kubernetes {
4038-
pods insecure
4039-
}
4040-
cache 30
4041-
log svc.svc.cluster.local.
4042-
prometheus :9153
4043-
}
4044-
4045-
.:9254 {
4046-
errors
4047-
health :9154 # this is global for all servers
4048-
prometheus :9153
4049-
forward . /etc/resolv.conf
4050-
pprof 127.0.0.1:9156
4051-
cache 30
4052-
reload
4053-
}
4054-
4055-
{{ if .KubeDns.NodeLocalResolver }}
4056-
- path: /srv/kubernetes/manifests/dnsmasq-node-ds.yaml
4057-
content: |
40584058
apiVersion: extensions/v1beta1
40594059
kind: DaemonSet
40604060
metadata:

0 commit comments

Comments
 (0)