app chart: soft node-affinity steering web+worker pods to app-worker nodes #7
No reviewers
Labels
No labels
agent-work
agent-working
ultracode
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
open-platform/app-template!7
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/app-worker-node-affinity"
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?
Why
platgold2 now has a second node (pg-grand, plat/mitosis#101), but it's underused: the server sits at 241/250 pods while pg-grand holds 8. Root cause (proven live): the default scheduler scores nodes by free CPU/mem, so the 80-core server always outscores the 4-core droplet — new pods pile onto the server until its hard 250-pod IP cap forces overflow, leaving the agent idle. A plain new pod scheduled with the server at 241/250 still lands on the server (verified).
What
A weight-100 soft
nodeAffinitytowardnode-role=app-workeron the app's web + worker Deployments (via a sharedapp.appWorkerAffinityhelper). Steers the light, numerous app/preview/worker pods onto the agent; CNPG databases are intentionally left on the big node (the agent is 8GB — fine for many light pods, not for heavy Postgres). Proven: a weight-100 affinity pulled test pods to pg-grand 3/3 despite the server's CPU/mem advantage.placement.preferAppWorker(default true),appWorkerWeight(100),appWorkerLabelKey/Value(node-role/app-worker) — all overridable per-app.preferred…): pods still schedule anywhere when no app-worker has room.Effect / rollout
Forward-looking: existing apps pick it up on their next release (helm upgrade rolls the Deployment → pod reschedules toward pg-grand); all new apps + preview envs get it immediately. Databases and already-placed PVC-pinned pods are unaffected. This relieves the server's pod-IP churn where it's worst (light/ephemeral pods) without pressuring the small node's RAM.
Not included (deliberate)
🤖 Generated with Claude Code