From ea9ca93d8bea876b67e8033bbcc83aef47c08567 Mon Sep 17 00:00:00 2001 From: Sandhya Dasu Date: Wed, 25 Feb 2026 11:57:08 -0500 Subject: [PATCH 1/3] Enable hosts plugin within the CoreDNS Corefile for cloud platforms Update the CoreDNS Corefile for cloud platforms to enable the hosts plugin. The hosts plugin was already enabled in the Corefile used on control plane nodes. This extends that to the bootstrap nodes. It is required on deployments where the /etc/hosts file contains entries to reach specialized services. --- manifests/cloud-platform-alt-dns/coredns-corefile.tmpl | 3 +++ 1 file changed, 3 insertions(+) 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 + } } From fcd5c4c2ce1bb7a9bcefbc0cec25ae030cdab902 Mon Sep 17 00:00:00 2001 From: Shaheen Sayyed <63461505+shaheen0b111@users.noreply.github.com> Date: Thu, 26 Feb 2026 12:44:43 +0530 Subject: [PATCH 2/3] Add hosts-dir volume and mount for CoreDNS --- .../common/cloud-platform-alt-dns/files/coredns.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) 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: From 122849a8c82021b88e7814adc606a15387376df0 Mon Sep 17 00:00:00 2001 From: Shaheen Sayyed <63461505+shaheen0b111@users.noreply.github.com> Date: Thu, 26 Feb 2026 12:45:49 +0530 Subject: [PATCH 3/3] Add hosts-dir volume mount to CoreDNS configuration --- manifests/cloud-platform-alt-dns/coredns.yaml | 4 ++++ 1 file changed, 4 insertions(+) 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