diff --git a/roles/kubernetes-apps/external_cloud_controller/openstack/defaults/main.yml b/roles/kubernetes-apps/external_cloud_controller/openstack/defaults/main.yml index 3affb19fcd027ad9b55832edc424bf6caa0b23ec..05a3a882c746dae54c4e349e68541bdb4d640c7e 100644 --- a/roles/kubernetes-apps/external_cloud_controller/openstack/defaults/main.yml +++ b/roles/kubernetes-apps/external_cloud_controller/openstack/defaults/main.yml @@ -23,3 +23,4 @@ external_openstack_cacert: "{{ lookup('env', 'OS_CACERT') }}" external_openstack_cloud_controller_extra_args: {} external_openstack_cloud_controller_image_tag: "v1.28.2" external_openstack_cloud_controller_bind_address: 127.0.0.1 +external_openstack_cloud_controller_dns_policy: ClusterFirst 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 d03be0bacc0c6b5ff78051c4c7b5bedc5715fecc..85df9975e4fa4c4fc0401c343de6746965dd8fc4 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,7 +81,9 @@ spec: - name: CLOUD_CONFIG value: /etc/config/cloud.conf hostNetwork: true - dnsPolicy: ClusterFirstWithHostNet +{% if external_openstack_cloud_controller_dns_policy is defined %} + dnsPolicy: {{ external_openstack_cloud_controller_dns_policy }} +{% endif %} volumes: {% if kubelet_flexvolumes_plugins_dir is defined %} - name: flexvolume-dir