Resolve compute-plan size field names from CRD schema #593

Merged
tobru merged 1 commit from fix/compute-plan-size-field-names into main 2026-07-06 06:57:00 +00:00
Owner

VSHN AppCat CRDs are inconsistent about how they name the compute-plan size fields under spec.parameters.size. Most (Forgejo, Nextcloud, Keycloak, PostgreSQL, MariaDB) use the nested convention (size.{cpu,memory} plus size.requests.{cpu,memory}), while VSHNRedis uses a flat convention (size.{cpuLimits,memoryLimits,cpuRequests, memoryRequests}).

The portal hardcoded the nested names everywhere. For Redis this meant the applied cpu/memory/requests keys did not exist in the CRD's structural schema, so Kubernetes pruned them on apply - the resources never landed and the drift check (reading the same stale paths) reported them as missing.

Resolve the actual field paths from the CRD's size schema and use them consistently in _apply_compute_plan_to_spec, resync_compute_plan_size, the instance-sanity drift check, and the sync_instances command. Falls back to the nested convention when the schema is unavailable, preserving existing behaviour.

VSHN AppCat CRDs are inconsistent about how they name the compute-plan size fields under spec.parameters.size. Most (Forgejo, Nextcloud, Keycloak, PostgreSQL, MariaDB) use the nested convention (size.{cpu,memory} plus size.requests.{cpu,memory}), while VSHNRedis uses a flat convention (size.{cpuLimits,memoryLimits,cpuRequests, memoryRequests}). The portal hardcoded the nested names everywhere. For Redis this meant the applied cpu/memory/requests keys did not exist in the CRD's structural schema, so Kubernetes pruned them on apply - the resources never landed and the drift check (reading the same stale paths) reported them as missing. Resolve the actual field paths from the CRD's size schema and use them consistently in _apply_compute_plan_to_spec, resync_compute_plan_size, the instance-sanity drift check, and the sync_instances command. Falls back to the nested convention when the schema is unavailable, preserving existing behaviour.
fix: resolve compute-plan size field names from CRD schema
All checks were successful
Tests / test (push) Successful in 1m24s
9ec85f8bca
VSHN AppCat CRDs are inconsistent about how they name the compute-plan
size fields under spec.parameters.size. Most (Forgejo, Nextcloud,
Keycloak, PostgreSQL, MariaDB) use the nested convention
(size.{cpu,memory} plus size.requests.{cpu,memory}), while VSHNRedis
uses a flat convention (size.{cpuLimits,memoryLimits,cpuRequests,
memoryRequests}).

The portal hardcoded the nested names everywhere. For Redis this meant
the applied cpu/memory/requests keys did not exist in the CRD's
structural schema, so Kubernetes pruned them on apply - the resources
never landed and the drift check (reading the same stale paths) reported
them as missing.

Resolve the actual field paths from the CRD's size schema and use them
consistently in _apply_compute_plan_to_spec, resync_compute_plan_size,
the instance-sanity drift check, and the sync_instances command. Falls
back to the nested convention when the schema is unavailable, preserving
existing behaviour.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
tobru merged commit 2b31625145 into main 2026-07-06 06:57:00 +00:00
tobru deleted branch fix/compute-plan-size-field-names 2026-07-06 06:57:00 +00:00
Sign in to join this conversation.
No description provided.