Skip to content

Commit

Permalink
baremetal and friends: Set coredns forward policy to sequential
Browse files Browse the repository at this point in the history
This was already done for openstack in #1527, but not for baremetal
because we don't have any separation between external and internal
hostnames. However, this behavior is unintuitive and we've found a
number of instances where it has caused problems on the other
platforms too.

Switching the forward policy to sequential will avoid potentially
confusing issues where a set of DNS servers works fine standalone
but breaks when configured as the forwarding upstreams in coredns.
  • Loading branch information
cybertron committed Nov 9, 2020
1 parent ba0a056 commit 0d7e44e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion manifests/on-prem/coredns-corefile.tmpl
Expand Up @@ -2,7 +2,9 @@
errors
health :18080
mdns {{ .ControllerConfig.DNS.Spec.BaseDomain }} {{`{{.Cluster.MasterAmount}}`}} {{`{{.Cluster.Name}}`}} {{`{{.NonVirtualIP}}`}}
forward . {{`{{- range $upstream := .DNSUpstreams}} {{$upstream}}{{- end}}`}}
forward . {{`{{- range $upstream := .DNSUpstreams}} {{$upstream}}{{- end}}`}} {
policy sequential
}
cache 30
reload
template IN {{`{{ .Cluster.IngressVIPRecordType }}`}} {{ .ControllerConfig.DNS.Spec.BaseDomain }} {
Expand Down
4 changes: 3 additions & 1 deletion pkg/operator/assets/bindata.go

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

4 changes: 3 additions & 1 deletion templates/common/on-prem/files/coredns-corefile.yaml
Expand Up @@ -6,7 +6,9 @@ contents:
errors
health :18080
mdns {{ .DNS.Spec.BaseDomain }} 0 {{`{{.Cluster.Name}}`}} {{`{{.NonVirtualIP}}`}}
forward . {{`{{- range $upstream := .DNSUpstreams}} {{$upstream}}{{- end}}`}}
forward . {{`{{- range $upstream := .DNSUpstreams}} {{$upstream}}{{- end}}`}} {
policy sequential
}
cache 30
reload
template IN {{`{{ .Cluster.IngressVIPRecordType }}`}} {{ .DNS.Spec.BaseDomain }} {
Expand Down
4 changes: 3 additions & 1 deletion templates/common/ovirt/files/coredns-corefile.yaml
Expand Up @@ -6,7 +6,9 @@ contents:
errors
health :18080
mdns {{ .DNS.Spec.BaseDomain }} 0 {{`{{.Cluster.Name}}`}} {{`{{.NonVirtualIP}}`}}
forward . {{`{{- range $upstream := .DNSUpstreams}} {{$upstream}}{{- end}}`}}
forward . {{`{{- range $upstream := .DNSUpstreams}} {{$upstream}}{{- end}}`}} {
policy sequential
}
cache 30
reload
file /etc/coredns/node-dns-db {{ .DNS.Spec.BaseDomain }}
Expand Down
4 changes: 3 additions & 1 deletion templates/common/vsphere/files/coredns-corefile.yaml
Expand Up @@ -7,7 +7,9 @@ contents:
errors
health :18080
mdns {{ .DNS.Spec.BaseDomain }} 0 {{`{{.Cluster.Name}}`}} {{`{{.NonVirtualIP}}`}}
forward . {{`{{- range $upstream := .DNSUpstreams}} {{$upstream}}{{- end}}`}}
forward . {{`{{- range $upstream := .DNSUpstreams}} {{$upstream}}{{- end}}`}} {
policy sequential
}
cache 30
reload
hosts {
Expand Down

0 comments on commit 0d7e44e

Please sign in to comment.