From c440106effb109e2911d45fe73f38cf94e6d8480 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 5 Dec 2023 02:52:17 +0100 Subject: [PATCH] add dnsPolicy: ClusterFirstWithHostNet to DaemonSets with hostNetwork: true value to avoid DNSConfigFormat events (#10618) --- .../csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 | 1 + .../external-openstack-cloud-controller-manager-ds.yml.j2 | 1 + roles/network_plugin/calico/templates/calico-node.yml.j2 | 1 + 3 files changed, 3 insertions(+) diff --git a/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 b/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 index 289b16830..d8346cc5b 100644 --- a/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 +++ b/roles/kubernetes-apps/csi_driver/cinder/templates/cinder-csi-nodeplugin.yml.j2 @@ -17,6 +17,7 @@ spec: spec: serviceAccountName: csi-cinder-node-sa hostNetwork: true + dnsPolicy: ClusterFirstWithHostNet containers: - name: node-driver-registrar image: {{ csi_node_driver_registrar_image_repo }}:{{ csi_node_driver_registrar_image_tag }} diff --git a/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-controller-manager-ds.yml.j2 b/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-controller-manager-ds.yml.j2 index 1c1eda8c5..8bae2aa11 100644 --- a/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-controller-manager-ds.yml.j2 +++ b/roles/kubernetes-apps/external_cloud_controller/openstack/templates/external-openstack-cloud-controller-manager-ds.yml.j2 @@ -81,6 +81,7 @@ spec: - name: CLOUD_CONFIG value: /etc/config/cloud.conf hostNetwork: true + dnsPolicy: ClusterFirstWithHostNet volumes: {% if kubelet_flexvolumes_plugins_dir is defined %} - name: flexvolume-dir diff --git a/roles/network_plugin/calico/templates/calico-node.yml.j2 b/roles/network_plugin/calico/templates/calico-node.yml.j2 index 4e49f3bc4..f3d52201f 100644 --- a/roles/network_plugin/calico/templates/calico-node.yml.j2 +++ b/roles/network_plugin/calico/templates/calico-node.yml.j2 @@ -30,6 +30,7 @@ spec: {{ calico_ds_nodeselector }} priorityClassName: system-node-critical hostNetwork: true + dnsPolicy: ClusterFirstWithHostNet serviceAccountName: calico-node tolerations: - operator: Exists