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

Commit 65918bf

Browse files
Add DnsMasq (node local resolver) command-line arguments/options (#1528)
Small change confirmed through testing
1 parent 03ab834 commit 65918bf

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

core/controlplane/config/config.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -865,10 +865,11 @@ type KubeDnsAutoscaler struct {
865865
}
866866

867867
type KubeDns struct {
868-
Provider string `yaml:"provider"`
869-
NodeLocalResolver bool `yaml:"nodeLocalResolver"`
870-
DeployToControllers bool `yaml:"deployToControllers"`
871-
Autoscaler KubeDnsAutoscaler `yaml:"autoscaler"`
868+
Provider string `yaml:"provider"`
869+
NodeLocalResolver bool `yaml:"nodeLocalResolver"`
870+
NodeLocalResolverOptions []string `yaml:"nodeLocalResolverOptions"`
871+
DeployToControllers bool `yaml:"deployToControllers"`
872+
Autoscaler KubeDnsAutoscaler `yaml:"autoscaler"`
872873
}
873874

874875
func (c *KubeDns) MergeIfEmpty(other KubeDns) {

core/controlplane/config/templates/cloud-config-controller

+5
Original file line numberDiff line numberDiff line change
@@ -3991,6 +3991,11 @@ write_files:
39913991
- --server=/in-addr.arpa/{{.DNSServiceIP}}
39923992
- --server=/ip6.arpa/{{.DNSServiceIP}}
39933993
- --log-facility=-
3994+
{{- if ne (len .KubeDns.NodeLocalResolverOptions) 0 }}
3995+
{{- range .KubeDns.NodeLocalResolverOptions }}
3996+
- {{.}}
3997+
{{- end }}
3998+
{{- end }}
39943999
ports:
39954000
- containerPort: 53
39964001
name: dns

core/root/config/templates/cluster.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,10 @@ kubeDns:
13631363
# When enabled, will enable a DNS-masq DaemonSet to make PODs to resolve DNS names via locally running dnsmasq
13641364
# It is disabled by default.
13651365
# nodeLocalResolver: false
1366+
# Extra DnsMasq options to use when running the nodeLocalResolver
1367+
# nodeLocalResolverOptions:
1368+
# - --neg-ttl=10
1369+
# - --no-ping
13661370

13671371
# When enabled, will deploy kube-dns to K8s controllers instead of workers.
13681372
# deployToControllers: false

0 commit comments

Comments
 (0)