From 31a18bdf34b444bae183b778374a57e3ff6051bc Mon Sep 17 00:00:00 2001 From: okozachenko1203 Date: Mon, 23 Oct 2023 20:21:49 +1100 Subject: [PATCH] fix: Set nodegroup labels always --- magnum_cluster_api/resources.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/magnum_cluster_api/resources.py b/magnum_cluster_api/resources.py index 67321354..fb2af74f 100644 --- a/magnum_cluster_api/resources.py +++ b/magnum_cluster_api/resources.py @@ -1676,14 +1676,14 @@ def generate_machine_deployments_for_cluster( "annotations": { AUTOSCALE_ANNOTATION_MIN: f"{utils.get_node_group_min_node_count(ng)}", # noqa: E501 AUTOSCALE_ANNOTATION_MAX: f"{utils.get_node_group_max_node_count(context, ng)}", # noqa: E501 - }, + } + if auto_scaling_enabled + else {}, "labels": { f"node-role.kubernetes.io/{ng.role}": "", "node.cluster.x-k8s.io/nodegroup": ng.name, }, - } - if auto_scaling_enabled - else {}, + }, "failureDomain": utils.get_cluster_label(cluster, "availability_zone", ""), "machineHealthCheck": { "enable": utils.get_cluster_label_as_bool(