refactor(extra): write the ComputePlane default pool's size into its release

The default md0 pool reached its KubernetesNodes release with only its
roles and floor, its ceiling and instance type coming from the pool
chart's schema defaults. A platform-rendered release is never defaulted
on write, so the release itself did not say what the pool can grow to,
and anything reading the reservation from it would have had to know
another chart's defaults. The figures written are the ones the pool
already rendered with, so the rendered pool does not change.

Assisted-by: LLM
Signed-off-by: Mattia Eleuteri <mattia@hidora.io>
This commit is contained in:
Mattia Eleuteri committed 2026-11-23 08:03:50 +01:00
1 parent fa7c94507a
commit a231f8d22b
2 files changed
+22 -1

No files matched your search

@@ -153,10 +153,16 @@ spec:
md0 with roles: [ingress-nginx]; that default is gone with the split, so the
module materialises the same md0 here, otherwise the pinned ingress-nginx
addon would have no node to schedule onto and stay Pending forever.
The default md0 carries its whole size, not only what differs from the pool
chart's defaults: those defaults live in the pool's schema and are never
written into a release rendered here, so without them the release would not
say what the pool can grow to, and a reservation read from it would have to
know another chart's defaults.
*/}}
{{- $pools := .Values.nodeGroups }}
{{- if not $pools }}
{{- $pools = dict "md0" (dict "roles" (list "ingress-nginx") "minReplicas" 0) }}
{{- $pools = dict "md0" (dict "roles" (list "ingress-nginx") "minReplicas" 0 "maxReplicas" 10 "instanceType" "u1.medium" "diskSize" "20Gi") }}
{{- end }}
{{- range $pool, $group := $pools }}
---
@@ -125,6 +125,21 @@ tests:
- equal:
path: spec.values.roles[0]
value: ingress-nginx
# The pool's size is written out rather than left to the pool chart's
# schema defaults, which a platform-rendered release never carries, so
# the release alone says what the pool can reserve.
- equal:
path: spec.values.minReplicas
value: 0
- equal:
path: spec.values.maxReplicas
value: 10
- equal:
path: spec.values.instanceType
value: u1.medium
- equal:
path: spec.values.diskSize
value: 20Gi
# canonical KubernetesNodes pool shape (mirrors rest.go): RetryOnFailure
# strategy + disableWait, not the parent module's remediation style.
- equal: