-
-
Notifications
You must be signed in to change notification settings - Fork 867
feat(supervisor): add k8 worker pod priority class support #2631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(supervisor): add k8 worker pod priority class support #2631
Conversation
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
|
WalkthroughThis pull request extends the Kubernetes configuration schema by adding a new optional environment variable Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes The review scope is limited to two tightly-related files with homogeneous changes focused on a single feature. The modifications are straightforward: adding an optional schema field and implementing conditional logic to use it. No complex logic density, no structural refactoring, and minimal risk of unintended side effects on existing functionality. 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)
🧰 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 (2)
⏰ 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 (2)
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_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: