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

Commit

Permalink
Add DnsMasq (node local resolver) command-line arguments/options (#1528)
Browse files Browse the repository at this point in the history
Small change confirmed through testing
  • Loading branch information
davidmccormick authored Jan 11, 2019
1 parent 03ab834 commit 65918bf
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
9 changes: 5 additions & 4 deletions core/controlplane/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -865,10 +865,11 @@ type KubeDnsAutoscaler struct {
}

type KubeDns struct {
Provider string `yaml:"provider"`
NodeLocalResolver bool `yaml:"nodeLocalResolver"`
DeployToControllers bool `yaml:"deployToControllers"`
Autoscaler KubeDnsAutoscaler `yaml:"autoscaler"`
Provider string `yaml:"provider"`
NodeLocalResolver bool `yaml:"nodeLocalResolver"`
NodeLocalResolverOptions []string `yaml:"nodeLocalResolverOptions"`
DeployToControllers bool `yaml:"deployToControllers"`
Autoscaler KubeDnsAutoscaler `yaml:"autoscaler"`
}

func (c *KubeDns) MergeIfEmpty(other KubeDns) {
Expand Down
5 changes: 5 additions & 0 deletions core/controlplane/config/templates/cloud-config-controller
Original file line number Diff line number Diff line change
Expand Up @@ -3991,6 +3991,11 @@ write_files:
- --server=/in-addr.arpa/{{.DNSServiceIP}}
- --server=/ip6.arpa/{{.DNSServiceIP}}
- --log-facility=-
{{- if ne (len .KubeDns.NodeLocalResolverOptions) 0 }}
{{- range .KubeDns.NodeLocalResolverOptions }}
- {{.}}
{{- end }}
{{- end }}
ports:
- containerPort: 53
name: dns
Expand Down
4 changes: 4 additions & 0 deletions core/root/config/templates/cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,10 @@ kubeDns:
# When enabled, will enable a DNS-masq DaemonSet to make PODs to resolve DNS names via locally running dnsmasq
# It is disabled by default.
# nodeLocalResolver: false
# Extra DnsMasq options to use when running the nodeLocalResolver
# nodeLocalResolverOptions:
# - --neg-ttl=10
# - --no-ping

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

0 comments on commit 65918bf

Please sign in to comment.