Skip to content

Commit e23d89d

Browse files
committed
test(apps/kubernetes): assert autoscaler max-size annotation on nonzero-minReplicas case
Symmetry with the zero-minReplicas neighbour, which already covers both min-size and max-size. CAPI's calculateMachineDeploymentReplicas defaults to 1 (not to minSize) if either annotation is missing on a new MachineDeployment, so both keys are load-bearing on the Create-path guarantee and worth asserting in both regression cases. Signed-off-by: IvanHunters <[email protected]>
1 parent 6ac52a1 commit e23d89d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎packages/apps/kubernetes/tests/nodegroups_default_test.yaml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,3 +227,13 @@ tests:
227227
path: kind
228228
value: MachineDeployment
229229
matchMany: true
230+
# Symmetric with the zero-minReplicas case above — both annotations
231+
# must land, because CAPI's calculateMachineDeploymentReplicas
232+
# defaults to 1 (not to minSize) if either annotation is missing.
233+
- equal:
234+
path: metadata.annotations["cluster.x-k8s.io/cluster-api-autoscaler-node-group-max-size"]
235+
value: "10"
236+
documentSelector:
237+
path: kind
238+
value: MachineDeployment
239+
matchMany: true

0 commit comments

Comments
 (0)