Fix update mode for node pool groups

Issues: https://github.com/rancher/aks-operator/issues/249
This commit is contained in:
Michal Jura 2023-08-26 17:02:28 +02:00
parent 2c9d9d251d
commit 3724d2ebab
No known key found for this signature in database
GPG Key ID: D7E3AA07FE1E8A1A
1 changed files with 4 additions and 0 deletions

View File

@ -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