From 3724d2ebabda092f791663a12d98ab7d8153594d Mon Sep 17 00:00:00 2001 From: Michal Jura Date: Sat, 26 Aug 2023 17:02:28 +0200 Subject: [PATCH] Fix update mode for node pool groups Issues: https://github.com/rancher/aks-operator/issues/249 --- controller/aks-cluster-config-handler.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/controller/aks-cluster-config-handler.go b/controller/aks-cluster-config-handler.go index a9a2d562..70cbd2d0 100644 --- a/controller/aks-cluster-config-handler.go +++ b/controller/aks-cluster-config-handler.go @@ -873,6 +873,10 @@ func (h *Handler) updateUpstreamClusterState(ctx context.Context, config *aksv1. logrus.Infof("Updating max surge in node pool [%s] for cluster [%s]", to.String(np.Name), config.Spec.ClusterName) updateNodePool = true } + if np.Mode != "" && np.Mode != upstreamNodePool.Mode { + logrus.Infof("Updating mode in node pool [%s] for cluster [%s]", to.String(np.Name), config.Spec.ClusterName) + updateNodePool = true + } } else { logrus.Infof("Adding node pool [%s] for cluster [%s]", to.String(np.Name), config.Spec.ClusterName) updateNodePool = true