Skip to content

chore: right-size admins/labs/ovk memory-limit quotas - #534

Merged
mashkovd merged 1 commit into
mainfrom
chore/right-size-tenant-memory-quotas
Jul 7, 2026
Merged

mashkovd merged 1 commit into
mainfrom
chore/right-size-tenant-memory-quotas

Conversation

@mashkovd

@mashkovd mashkovd commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #532 (openclaw/claude-remote memory-limit trim, merged). Re-measured live tenant quota usage after that trim via mctl_get_resource_usage and lowered each tenant's quotas.limits.memory:

Tenant used (post-trim) old quota new quota freed
admins 3712Mi 6Gi 5Gi 1Gi
ovk 1920Mi 4Gi 3Gi 1Gi
labs 6560Mi 11Gi 10.5Gi 0.5Gi

labs gets a smaller cut than the other two on purpose: labs-openclaw is currently replicaCount: 0 but documented as intended to come back online. Its 6560Mi "used" today doesn't include openclaw's 2048Mi (post-trim) limit, so the new quota is budgeted for current used + openclaw's future limit + the ~2Gi headroom labs' own 2026-05-10 bump comment validated for concurrent workflow/preview pods — not just today's snapshot. admins and ovk don't have a similar "currently scaled down" service, so their buffers are sized directly off live usage.

Why

Part of the 2026-07 platform capacity audit follow-up (docs/audit/PLATFORM_ASSESSMENT_2026-07.md): by memory limits the cluster only had headroom for ~1 more nfc-sized tenant. This is step 2 of the plan (step 1 was #532); freeing the quota ceiling itself is what actually returns memory to the shared cluster pool, since the ResourceQuota ceiling — not the underlying pod specs — is what reserves capacity for planning purposes.

Test plan

  • helm template rendered platform-gitops/helm-charts/tenant for all three tenants, confirmed the new limits.memory value in the rendered ResourceQuota
  • After merge + ArgoCD sync: re-run mctl_get_resource_usage for admins/labs/ovk to confirm used stays comfortably under the new allocated
  • @claude review and CI green before merge

Follow-up to mctl-gitops#532 (openclaw/claude-remote memory-limit
trim). Re-measured live tenant quota usage after that trim and
lowered each tenant's limits.memory to steady-state usage plus a
buffer sized the same way each tenant's own quota-bump history
justified past increases:

- admins: 6Gi -> 5Gi (used 3712Mi, ~1.3Gi headroom)
- ovk: 4Gi -> 3Gi (used 1920Mi, ~1.1Gi headroom)
- labs: 11Gi -> 10.5Gi (used 6560Mi, but labs-openclaw is currently
  scaled to 0 and documented to come back online; budgeted for its
  2048Mi limit plus the ~2Gi headroom labs' own 2026-05-10 bump
  validated for concurrent workflow + preview pods, so only a modest
  512Mi trim here instead of matching the other two tenants' cut)

Frees 2.5Gi of cluster-wide memory-limit quota ceiling for onboarding
more tenants, per the 2026-07 capacity audit
(docs/audit/PLATFORM_ASSESSMENT_2026-07.md).
@claude

claude Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Claude encountered an error after 0s —— View job


I'll analyze this and get back to you.

@claude

claude Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

Claude finished @mashkovd's task in 41s —— View job


Review: Approved ✓

This is a trivial config-only change to tenant memory-limit quotas. All three changes are correct, well-documented, and operationally sound:

admins (6Gi → 5Gi): Frees 1Gi. Measured usage 3712Mi + 1.3Gi headroom for deploy/rollback pods.

labs (11Gi → 10.5Gi): Frees 512Mi (conservative trim). Accounts for 6560Mi current usage + 2048Mi future openclaw restart + 2Gi headroom (validates concurrent workflow/preview pods).

ovk (4Gi → 3Gi): Frees 1Gi. Measured usage 1920Mi + 1.1Gi headroom for workflow pods.

All quota adjustments follow the capacity audit rationale (#532 follow-up), preserve adequate headroom, and reference the context clearly in comments. YAML syntax is valid; no security, correctness, or operational safety issues.

P1 findings: 0
P2 findings: 0
P3 findings: 0

✅ No issues, good to merge.


@mashkovd
mashkovd merged commit a1bcc59 into main Jul 7, 2026
6 checks passed
@mashkovd
mashkovd deleted the chore/right-size-tenant-memory-quotas branch July 7, 2026 06:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 032bac40e0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# 512Mi trim vs the un-adjusted 9Gi first estimate, on purpose — this
# tenant has the documented history of workflow pods stuck Pending when
# headroom got too tight.
limits.memory: "10.5Gi"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Canonicalize the labs memory quota quantity

Kubernetes stores Quantity fields in canonical form; the Kubernetes Quantity docs note that 1.5Gi is re-emitted as 1536Mi, and the Argo CD FAQ calls out normalized resource quantities as an OutOfSync source. With this tenant Application using automated sync plus ApplyOutOfSyncOnly, applying 10.5Gi will come back from the API as 10752Mi, so tenant-labs can remain OutOfSync and keep self-healing even though the quota is numerically unchanged. Use the canonical 10752Mi (or an integral Gi value) in git.

Useful? React with 👍 / 👎.

# 512Mi trim vs the un-adjusted 9Gi first estimate, on purpose — this
# tenant has the documented history of workflow pods stuck Pending when
# headroom got too tight.
limits.memory: "10.5Gi"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include openclaw sidecars in the labs quota budget

The budget here adds only 2048Mi for bringing labs-openclaw back, but that pod's app containers include the 2048Mi main container plus the 256Mi s3-sync, 64Mi skills-fanout, and 64Mi mctl-token-refresh sidecars, so re-enabling it consumes 2432Mi of limits.memory. With the stated current usage, the new quota leaves 10752Mi - 6560Mi - 2432Mi = 1760Mi, below the ~2Gi workflow/preview headroom this comment says is preserved; the same concurrent workflow/preview case that drove the May bump can still be denied by quota. Raise this to at least 11040Mi (or keep 11Gi) if that headroom is intended.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant