Skip to content

Commit

Permalink
Merge pull request #674 from mjura/az-v2.9
Browse files Browse the repository at this point in the history
[v2.9] Add validation for modifications to availability zones
  • Loading branch information
mjura authored Oct 1, 2024
2 parents 947a102 + 8f4a309 commit fbfc9d9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controller/aks-cluster-config-handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,9 @@ func (h *Handler) updateUpstreamClusterState(ctx context.Context, config *aksv1.
logrus.Debugf("config: %s; upstream: %s", np.Mode, upstreamNodePool.Mode)
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)
}
} else {
logrus.Infof("Adding node pool [%s] for cluster [%s (id: %s)]", aks.String(np.Name), config.Spec.ClusterName, config.Name)
updateNodePool = true
Expand Down

0 comments on commit fbfc9d9

Please sign in to comment.