feat: add configurable cpu/ram limits to k8s scope (CLIEN-781)#185
Merged
Conversation
fedemaleh
commented
May 22, 2026
fedemaleh
commented
May 22, 2026
ignacioboud
approved these changes
May 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cpu_millicores_limitandram_memory_limitcapabilities to the k8s scope spec so the Spin team can decouple Kubernetesresources.limitsfromresources.requests.ram_memory(request) at the top of the main form; both new fields live in the renamedResourcestab inside ADVANCED, alongside the existingcpu_millicores(request).build_contextnormalizes a missing/null limit to the request value viajq //=, so existing scopes render exactly the sameresources:block as before.minimum: {"$data": "1/<request_field>"}rejectslimit < requestat the schema layer, reusing the precedent fromhealth_check.period_seconds.requiredso the nullplatform UI actually renders them (rule from CLIEN-739: UI only renders required fields).Spec:
docs/superpowers/specs/2026-05-21-clien-781-memory-cpu-limits-design.mdPlan:
docs/superpowers/plans/2026-05-21-clien-781-memory-cpu-limits.mdTicket: https://nullplatform.atlassian.net/browse/CLIEN-781
Test plan
bats k8s/deployment/tests/build_context.bats— 56 tests pass, including 5 newnormalize_capability_limitscases (limit absent / null / explicit, both fields).bats k8s/deployment/tests/deployment_template_shape.bats— new structural test file, 5 cases asserting application container uses the right field for request vs limit, and that sidecars are NOT affected.bats k8s/deployment/tests/build_deployment.bats— no regressions.resources:block — explicit limits render verbatim; normalized null falls back to request value (1:1 with current production behavior).