Skip to content

Commit c6fa76a

Browse files
committed
AKS: clarify that one system pool is required
1 parent 724a4e7 commit c6fa76a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

exp/api/v1beta1/azuremanagedmachinepool_webhook.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,9 @@ func (m *AzureManagedMachinePool) ValidateUpdate(oldRaw runtime.Object, client c
154154
if m.Spec.Mode != string(NodePoolModeSystem) && old.Spec.Mode == string(NodePoolModeSystem) {
155155
// validate for last system node pool
156156
if err := m.validateLastSystemNodePool(client); err != nil {
157-
allErrs = append(allErrs, field.Invalid(
157+
allErrs = append(allErrs, field.Forbidden(
158158
field.NewPath("Spec", "Mode"),
159-
m.Spec.Mode,
160-
"Last system node pool cannot be mutated to user node pool"))
159+
"Cannot change node pool mode to User, you must have at least one System node pool in your cluster"))
161160
}
162161
}
163162

0 commit comments

Comments
 (0)