From 6ad83b120a23d83065363b7e1003be305e26efea Mon Sep 17 00:00:00 2001 From: Mattia Eleuteri Date: Mon, 9 Nov 2026 10:08:04 +0100 Subject: [PATCH] test(computeplane): forward an explicit zero and the int32 maximum of maxUnavailable An explicit 0 is what overrides the pool chart's default of 1 for GPU pools, so it must reach the pool unchanged rather than be dropped as an empty value. The int32 maximum is the largest value the schema accepts and must be forwarded as is. Assisted-by: LLM Signed-off-by: Mattia Eleuteri (cherry picked from commit 28b66bbc638366994a7654b912b9021e42c7a781) Signed-off-by: cozystack-ci[bot] <274107086+cozystack-ci[bot]@users.noreply.github.com> --- .../computeplane/tests/cluster_test.yaml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/packages/extra/computeplane/tests/cluster_test.yaml b/packages/extra/computeplane/tests/cluster_test.yaml index d56e21d30..6dc4b8835 100644 --- a/packages/extra/computeplane/tests/cluster_test.yaml +++ b/packages/extra/computeplane/tests/cluster_test.yaml @@ -301,6 +301,44 @@ tests: path: spec.values.maxUnavailable value: 1 + # An explicit 0 must reach the pool chart: there it overrides the 1 a GPU + # pool gets by default, so dropping it as empty would change the strategy. + - it: forwards an explicit maxUnavailable of 0 to the pool chart + documentSelector: + path: metadata.name + value: kubernetes-nodes-computeplane-cluster-md0 + set: + nodeGroups: + md0: + minReplicas: 1 + maxReplicas: 3 + instanceType: u1.large + diskSize: 32Gi + roles: ["ingress-nginx"] + maxUnavailable: 0 + asserts: + - equal: + path: spec.values.maxUnavailable + value: 0 + + - it: forwards the int32 maximum to the pool chart + documentSelector: + path: metadata.name + value: kubernetes-nodes-computeplane-cluster-md0 + set: + nodeGroups: + md0: + minReplicas: 1 + maxReplicas: 3 + instanceType: u1.large + diskSize: 32Gi + roles: ["ingress-nginx"] + maxUnavailable: 2147483647 + asserts: + - equal: + path: spec.values.maxUnavailable + value: 2147483647 + - it: refuses a maxUnavailable above the int32 range CAPI decodes set: nodeGroups: