feat(supervisor): add k8 worker pod priority class support#2631
feat(supervisor): add k8 worker pod priority class support#2631NERLOE wants to merge 2 commits intotriggerdotdev:mainfrom
Conversation
|
WalkthroughThis change adds an optional environment variable Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
🧬 Code graph analysis (1)apps/supervisor/src/workloadManager/kubernetes.ts (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (22)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Add KUBERNETES_POD_PRIORITY_CLASS_NAME environment variable to allow configuring a priority class for task run pods in Kubernetes environments. This addresses pod preemption issues in resource-constrained clusters, particularly in GKE Autopilot where low-priority pods can be preempted by system pods during scale-up operations. Fixes: Pod preemption causing SIGTERM failures during cluster scale-up Related: GKE Autopilot resource contention
7a77c9f to
9045e31
Compare
Add KUBERNETES_WORKER_PRIORITY_CLASS_NAME environment variable to allow configuring a priority class for task run pods in Kubernetes environments.
This addresses pod preemption issues in resource-constrained clusters, particularly in GKE Autopilot where low-priority pods can be preempted by system pods during scale-up operations.
Closes #2630
✅ Checklist
Testing
Added example configuration and tested assignment of priority class on our worker pods in our GKE Autopilot production cluster.
Changelog
KUBERNETES_WORKER_PRIORITY_CLASS_NAMEenvironment variable toapps/supervisor/src/env.tspriorityClassNamein Kubernetes pod spec (apps/supervisor/src/workloadManager/kubernetes.ts)Screenshots
N/A - Infrastructure/backend change. Configuration can be verified via:
# Verify priority class is applied to new worker pods kubectl get pods -n trigger -l app=task-run \ -o custom-columns=NAME:.metadata.name,PRIORITY:.spec.priority,PRIORITY_CLASS:.spec.priorityClassNameExpected output after configuration: