fix(magnum): set nodeSelector for according to the network backend (#750)
Co-authored-by: okozachenko1203 <okozachenko1203@users.noreply.github.com>
diff --git a/roles/magnum/defaults/main.yml b/roles/magnum/defaults/main.yml
index 90d0925..60cd1a7 100644
--- a/roles/magnum/defaults/main.yml
+++ b/roles/magnum/defaults/main.yml
@@ -52,3 +52,8 @@
- name: ubuntu-2204-kube-v1.27.3
url: https://object-storage.public.mtl1.vexxhost.net/swift/v1/a91f106f55e64246babde7402c21b87a/magnum-capi/ubuntu-2204-kube-v1.27.3.qcow2
distro: ubuntu
+
+magnum_cluster_api_proxy_ovs_node_selector:
+ openstack-control-plane: enabled
+magnum_cluster_api_proxy_ovn_node_selector:
+ openvswitch: enabled
diff --git a/roles/magnum/tasks/main.yml b/roles/magnum/tasks/main.yml
index 726d39a..93885b3 100644
--- a/roles/magnum/tasks/main.yml
+++ b/roles/magnum/tasks/main.yml
@@ -152,8 +152,7 @@
- name: host-run-netns
mountPath: /run/netns
mountPropagation: Bidirectional
- nodeSelector:
- openstack-control-plane: enabled
+ nodeSelector: "{{ magnum_cluster_api_proxy_ovn_node_selector if atmosphere_network_backend == 'ovn' else magnum_cluster_api_proxy_ovs_node_selector }}" # noqa: yaml[line-length]
securityContext:
runAsUser: 42424
serviceAccountName: magnum-conductor