Skip to content

Commit

Permalink
Return error when updating az
Browse files Browse the repository at this point in the history
  • Loading branch information
mjura committed Oct 29, 2024
1 parent 72d18d7 commit 05c217f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/aks-cluster-config-handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 05c217f

Please sign in to comment.