Skip to content

Commit

Permalink
Don't let node-local-dns add iptables rules
Browse files Browse the repository at this point in the history
Since we use the local IP we don't need the iptables rule for the cluster dns IP
  • Loading branch information
Ole Markus With committed Oct 16, 2020
1 parent d105c92 commit a7c7af4
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 26 deletions.
20 changes: 10 additions & 10 deletions upup/models/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ data:
}
reload
loop
bind {{ KubeDNS.NodeLocalDNS.LocalIP }}{{ if NodeLocalDNSServerIP }} {{ NodeLocalDNSServerIP }}{{ end }}
bind {{ KubeDNS.NodeLocalDNS.LocalIP }}
forward . {{ NodeLocalDNSClusterIP }} {
force_tcp
}
Expand All @@ -62,7 +62,7 @@ data:
cache 30
reload
loop
bind {{ KubeDNS.NodeLocalDNS.LocalIP }}{{ if NodeLocalDNSServerIP }} {{ NodeLocalDNSServerIP }}{{ end }}
bind {{ KubeDNS.NodeLocalDNS.LocalIP }}
forward . {{ NodeLocalDNSClusterIP }} {
force_tcp
}
Expand All @@ -73,7 +73,7 @@ data:
cache 30
reload
loop
bind {{ KubeDNS.NodeLocalDNS.LocalIP }}{{ if NodeLocalDNSServerIP }} {{ NodeLocalDNSServerIP }}{{ end }}
bind {{ KubeDNS.NodeLocalDNS.LocalIP }}
forward . {{ NodeLocalDNSClusterIP }} {
force_tcp
}
Expand All @@ -84,7 +84,7 @@ data:
cache 30
reload
loop
bind {{ KubeDNS.NodeLocalDNS.LocalIP }}{{ if NodeLocalDNSServerIP }} {{ NodeLocalDNSServerIP }}{{ end }}
bind {{ KubeDNS.NodeLocalDNS.LocalIP }}
forward . __PILLAR__UPSTREAM__SERVERS__
prometheus :9253
}
Expand Down Expand Up @@ -126,16 +126,16 @@ spec:
operator: "Exists"
containers:
- name: node-cache
image: k8s.gcr.io/k8s-dns-node-cache:1.15.10
image: k8s.gcr.io/dns/k8s-dns-node-cache:1.15.14
resources:
requests:
cpu: {{ KubeDNS.NodeLocalDNS.CPURequest }}
memory: {{ KubeDNS.NodeLocalDNS.MemoryRequest }}
{{ if NodeLocalDNSServerIP }}
args: [ "-localip", "{{ .KubeDNS.NodeLocalDNS.LocalIP }},{{ NodeLocalDNSServerIP }}", "-conf", "/etc/Corefile", "-upstreamsvc", "kube-dns-upstream" ]
{{ else }}
args: [ "-localip", "{{ .KubeDNS.NodeLocalDNS.LocalIP }}", "-conf", "/etc/Corefile", "-upstreamsvc", "kube-dns-upstream" ]
{{ end }}
args:
- -localip={{ .KubeDNS.NodeLocalDNS.LocalIP }}
- -conf=/etc/Corefile
- -upstreamsvc=kube-dns-upstream
- -setupiptables=false
securityContext:
privileged: true
ports:
Expand Down
6 changes: 0 additions & 6 deletions upup/pkg/fi/cloudup/template_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,6 @@ func (tf *TemplateFunctions) AddTo(dest template.FuncMap, secretStore fi.SecretS
}
return "__PILLAR__CLUSTER__DNS__"
}
dest["NodeLocalDNSServerIP"] = func() string {
if cluster.Spec.KubeProxy.ProxyMode == "ipvs" {
return ""
}
return cluster.Spec.KubeDNS.ServerIP
}
dest["NodeLocalDNSHealthCheck"] = func() string {
return fmt.Sprintf("%d", wellknownports.NodeLocalDNSHealthCheck)
}
Expand Down

0 comments on commit a7c7af4

Please sign in to comment.