From 05c217f0c6f70498cf7b9bbe202216cbcfe066ee Mon Sep 17 00:00:00 2001 From: Michal Jura Date: Tue, 29 Oct 2024 09:00:22 +0100 Subject: [PATCH] Return error when updating az --- controller/aks-cluster-config-handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/aks-cluster-config-handler.go b/controller/aks-cluster-config-handler.go index 7af0a099..06ea2970 100644 --- a/controller/aks-cluster-config-handler.go +++ b/controller/aks-cluster-config-handler.go @@ -935,7 +935,7 @@ func (h *Handler) updateUpstreamClusterState(ctx context.Context, config *aksv1. updateNodePool = true } if np.AvailabilityZones != nil && !reflect.DeepEqual(np.AvailabilityZones, upstreamNodePool.AvailabilityZones) { - logrus.Errorf("Changing availability zones for node pool [%s] in cluster [%s (id: %s)] is not permitted", aks.String(np.Name), config.Spec.ClusterName, config.Name) + return config, fmt.Errorf("Changing availability zones for node pool [%s] in cluster [%s (id: %s)] is not permitted", aks.String(np.Name), config.Spec.ClusterName, config.Name) } } else { logrus.Infof("Adding node pool [%s] for cluster [%s (id: %s)]", aks.String(np.Name), config.Spec.ClusterName, config.Name)