diff --git a/manifests/cloud-platform-alt-dns/coredns-corefile.tmpl b/manifests/cloud-platform-alt-dns/coredns-corefile.tmpl index a5ab0d875f..eeb0f814bc 100644 --- a/manifests/cloud-platform-alt-dns/coredns-corefile.tmpl +++ b/manifests/cloud-platform-alt-dns/coredns-corefile.tmpl @@ -33,4 +33,7 @@ match ^api-int.{{ .ControllerConfig.DNS.Spec.BaseDomain }} fallthrough } + hosts { + fallthrough + } } diff --git a/manifests/cloud-platform-alt-dns/coredns.yaml b/manifests/cloud-platform-alt-dns/coredns.yaml index 0ab83743cc..e06f0585a5 100644 --- a/manifests/cloud-platform-alt-dns/coredns.yaml +++ b/manifests/cloud-platform-alt-dns/coredns.yaml @@ -55,6 +55,8 @@ spec: - name: manifests mountPath: "/opt/openshift/manifests" mountPropagation: HostToContainer + - name: hosts-dir + mountPath: "/etc/hosts" imagePullPolicy: IfNotPresent containers: - name: coredns @@ -71,6 +73,8 @@ spec: volumeMounts: - name: conf-dir mountPath: "/etc/coredns" + - name: hosts-dir + mountPath: "/etc/hosts" livenessProbe: httpGet: path: /health diff --git a/templates/common/cloud-platform-alt-dns/files/coredns.yaml b/templates/common/cloud-platform-alt-dns/files/coredns.yaml index 3cbf2213ce..77d01e9659 100644 --- a/templates/common/cloud-platform-alt-dns/files/coredns.yaml +++ b/templates/common/cloud-platform-alt-dns/files/coredns.yaml @@ -28,6 +28,9 @@ contents: - name: nm-resolv hostPath: path: "/var/run/NetworkManager" + - name: hosts-dir + hostPath: + path: "/etc/hosts" initContainers: - name: render-config-coredns image: {{ .Images.baremetalRuntimeCfgImage }} @@ -59,6 +62,9 @@ contents: - name: conf-dir mountPath: "/etc/coredns" mountPropagation: HostToContainer + - name: hosts-dir + mountPath: "/etc/hosts" + mountPropagation: HostToContainer imagePullPolicy: IfNotPresent terminationMessagePolicy: FallbackToLogsOnError containers: @@ -74,6 +80,8 @@ contents: volumeMounts: - name: conf-dir mountPath: "/etc/coredns" + - name: hosts-dir + mountPath: "/etc/hosts" livenessProbe: httpGet: path: /health @@ -120,6 +128,9 @@ contents: - name: nm-resolv mountPath: "/var/run/NetworkManager" mountPropagation: HostToContainer + - name: hosts-dir + mountPath: "/etc/hosts" + mountPropagation: HostToContainer imagePullPolicy: IfNotPresent hostNetwork: true tolerations: