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

Commit

Permalink
Add OptionalNodeResolverOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmccormick committed Jan 11, 2019
1 parent 6849c46 commit 70123fd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
4 changes: 4 additions & 0 deletions builtin/files/cluster.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -1319,6 +1319,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
5 changes: 5 additions & 0 deletions builtin/files/userdata/cloud-config-controller
Original file line number Diff line number Diff line change
Expand Up @@ -3630,6 +3630,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
9 changes: 5 additions & 4 deletions pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,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

0 comments on commit 70123fd

Please sign in to comment.