App Deployments (4c-ii): cluster capacity accounting + footprint#222
Merged
Conversation
Capacity increment (part 2): order-time admission counterpart to the operator's per-namespace ResourceQuota. - DB: app gains cpu_milli/memory_bytes/storage_bytes (its footprint); app_cluster gains static admin-set capacity_* columns (1:1, no overcommit). Migration + model + mysql + mock. - Admin: the app footprint is computed from the compose (lnvps_compose::footprint = sum service resources + volume sizes) and stored on create/update; capacity_* settable on cluster create/update; both surfaced on AdminAppInfo / AdminAppClusterInfo. - AppClusterCapacityService (lnvps_api_common, mirrors HostCapacityService): used / available / fits / select_in_region, where available = capacity − Σ footprint of non-deleted deployments. Unit-tested via MockDb. - e2e admin test asserts computed footprint + capacity echo. Consumed at order time by the customer ordering flow (3b, next). Part of work/app-deployments.md.
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.
Second half of capacity management — the order-time admission counterpart to the operator's per-namespace ResourceQuota (#221).
Schema
appgainscpu_milli/memory_bytes/storage_bytes(its footprint).app_clustergains static admin-setcapacity_cpu_milli/capacity_memory_bytes/capacity_storage_bytes(1:1, no overcommit; a 0-capacity cluster accepts nothing).Admin
lnvps_compose::footprint= Σ serviceresources+ volume sizes) and stored onPOST/PATCH /api/admin/v1/apps.capacity_*are settable onPOST/PATCH /api/admin/v1/app_clusters.AdminAppInfo/AdminAppClusterInfo.AppClusterCapacityService(lnvps_api_common, mirrorsHostCapacityService)used/available/fits/select_in_region, whereavailable = capacity − Σ footprint(non-deleted deployments). Unit-tested via MockDb.Tests / docs
Next
3b) customer ordering — validate config, run capacity admission via
select_in_region, then create the subscription + line item + invoice.