Resolve compute-plan size field names from CRD schema #593
No reviewers
Labels
No labels
API
Billing
UI/UX
dependencies
bug
change
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
servala/servala-portal!593
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/compute-plan-size-field-names"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>