From da6a698a064cca3f37bc943a4598520856388733 Mon Sep 17 00:00:00 2001 From: Sandhya Dasu Date: Thu, 6 Aug 2026 16:25:21 -0400 Subject: [PATCH] OCPBUGS-98258: Fix upstreams for CoreDNS pods on Cloud platforms On cloud platforms, the CoreDNS Corefile's Upstreams were getting generated using the host's /etc/resolv.conf that is modified by network manager to include the local host. That resulted in the CoreDNS upstreams to include the IP of the node on which the CoreDNS static pod was running on. Fixed to use the NetworkManager's original upstream resolv.conf instead. --- .../common/cloud-platform-alt-dns/files/coredns.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/templates/common/cloud-platform-alt-dns/files/coredns.yaml b/templates/common/cloud-platform-alt-dns/files/coredns.yaml index 3cbf2213ce..09acf0ab15 100644 --- a/templates/common/cloud-platform-alt-dns/files/coredns.yaml +++ b/templates/common/cloud-platform-alt-dns/files/coredns.yaml @@ -47,7 +47,7 @@ contents: - "--out-dir" - "/etc/coredns" - "--resolvconf-path" - - "/etc/resolv.conf" + - "/var/run/NetworkManager/resolv.conf" resources: {} volumeMounts: - name: kubeconfig @@ -59,6 +59,10 @@ contents: - name: conf-dir mountPath: "/etc/coredns" mountPropagation: HostToContainer + - name: nm-resolv + mountPath: "/var/run/NetworkManager" + mountPropagation: HostToContainer + readOnly: true imagePullPolicy: IfNotPresent terminationMessagePolicy: FallbackToLogsOnError containers: @@ -86,8 +90,6 @@ contents: terminationMessagePolicy: FallbackToLogsOnError imagePullPolicy: IfNotPresent - name: coredns-monitor - securityContext: - privileged: true image: {{ .Images.baremetalRuntimeCfgImage }} command: - corednsmonitor