Skip to content

fix(staging): fit the staging release on existing nodes (spot + right-sized, clawdbot off) - #2447

Merged
lilyshen0722 merged 1 commit into
mainfrom
sre-staging-right-sized
Oct 23, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
sre-staging-right-sized

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Makes the staging release fit the nodes we already have. The first hand-install hit the --atomic timeout and rolled back cleanly (prod untouched): backend sat Pending (no spot toleration → only the full, untainted default-pool: "Insufficient cpu / untolerated taints"), and clawdbot-gateway's two PVCs never Bound. This is a requests problem, not load — live node CPU is 3–17%.

What changed (values-staging.yaml only)

  • backend + frontend → spot pool, with the workload-tier=spot toleration + nodeSelector, at a fraction of prod's requests (backend 100m/256Mi, frontend 50m/128Mi). Prod backend deliberately stays on dev-pool (it holds session state a spot reclamation must never interrupt); staging is the reckless, resettable lane, so a reclamation just restarts it.
  • clawdbot-gateway OFF in staging — prod runs no clawdbot-gateway Deployment either (backend, commonly-bot, frontend, litellm, redis only). Its persistence.config/persistence.workspace PVCs are disabled too, so the gateway leaves nothing unbound.

No node-pool or autoscaler-max change (that's new spend / Sam's call), and it didn't need one.

Verified

  • Prod render byte-identical to main (3f41646b…); the diff is values-staging.yaml only.
  • Installed live (helm upgrade --install --atomic, right-sized): all four pods Ready — backend/frontend/mongodb on spot-pool, redis on default-pool; prod commonly-dev unchanged (pod list + restartCounts + backend RS identical before/after).
  • 3 ExternalSecrets SecretSynced; no GITHUB_PAT in api-keys; 0 Ingress; mongo host resolves to the in-cluster mongodb Service (not Atlas/Aiven); backend /api/health/ready → 200 {"status":"ready"}.

litellm remains off in staging (hosted agents answer through it) — tracked separately; decision pending on whether the Fri walk needs an agent to reply.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Nju36GWpimrACHLKahbB4L

…-sized, clawdbot off)

The first hand-install hit the atomic timeout: backend was stuck Pending (no spot
toleration → only the full, untainted default-pool; "Insufficient cpu / untolerated
taints"), and clawdbot-gateway's two PVCs never Bound. This is about requests, not
load — live node CPU is 3–17%.

- backend + frontend now schedule on the spot pool (workload-tier=spot toleration +
  nodeSelector) with requests at a fraction of prod (backend 100m/256Mi, frontend
  50m/128Mi). Prod backend deliberately stays on dev-pool (session state); staging is
  the reckless, resettable lane where a spot reclamation just restarts it.
- clawdbot-gateway OFF in staging (prod runs no gateway Deployment either), and its
  persistence.config/workspace PVCs disabled so the gateway leaves nothing unbound.

No node-pool or autoscaler change. Prod render byte-identical to main (3f41646b);
diff is values-staging.yaml only. Staging total CPU requests ~300m, well within the
spot pool. litellm remains off (open question for whether the Fri walk needs an agent
to answer).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Nju36GWpimrACHLKahbB4L

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

#2447 CLEARED at 4ae55d9

Own exact-head Helm checks pass. Production (values + values-dev) is byte-identical to current main 585e11c (39 objects), and its backend remains off spot. Staging changes only backend/frontend PodSpec resources and placement, and removes the gateway Deployment, Service, and both gateway PVCs (23 to 19 objects). Backend requests are 100m/256Mi; frontend 50m/128Mi; both have workload-tier=spot selectors and matching NoSchedule tolerations. The unused clawdbot ConfigMap remains; the gateway workload and PVCs do not. Strict js-yaml loadAll parses both environments, with Helm stderr separate and empty.

Read the full one-file +59 diff against merge-base bd58ba2; no node-pool/autoscaler resource or production override changes, no credential/private R12 identifier added. Diff check clean, rubric/checklist unchanged, fetched/live head matched. CI currently has 20 successful checks, 2 skipped, and Legacy test and coverage still in progress; this is a source/render clearance, not a claim that every check has completed.

No blocking defect. SRE's live fit/readiness/prod-unchanged observations remain attributed operator evidence; I did not measure current node allocatable capacity, live scheduling, or the authenticated staging journey. The staging spot tradeoff is explicitly documented; it does not change prod placement. The subsequent deploy-staging workflow must retain the requested merge ordering after this chart change.

Written by Rhea, a Commonly agent — https://commonly.me/pods/6a8f6dc7a1dccf2e02f31015

GATE: PASS

@lilyshen0722
lilyshen0722 added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 4bc6322 Oct 23, 2026
24 checks passed
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