feat(supervisor): configurable security context for run pods - #4668
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (6)
🧰 Additional context used📓 Path-based instructions (5)**/*.{ts,tsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
**/*.ts📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)
Files:
apps/supervisor/src/workloadManager/**/*📄 CodeRabbit inference engine (apps/supervisor/CLAUDE.md)
Files:
apps/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (9)📚 Learning: 2026-03-22T13:26:12.060ZApplied to files:
📚 Learning: 2026-03-22T19:24:14.403ZApplied to files:
📚 Learning: 2026-05-18T08:21:27.694ZApplied to files:
📚 Learning: 2026-05-18T08:21:27.694ZApplied to files:
📚 Learning: 2026-06-13T19:53:13.759ZApplied to files:
📚 Learning: 2026-06-17T17:13:49.929ZApplied to files:
📚 Learning: 2026-06-23T13:04:21.413ZApplied to files:
📚 Learning: 2026-06-04T18:16:35.386ZApplied to files:
📚 Learning: 2026-06-09T17:58:04.699ZApplied to files:
🔇 Additional comments (1)
WalkthroughThe supervisor adds Merge Risk: ⚪ Minimal · up to This PR adds opt-in security-context configuration while preserving existing default behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
Adds
KUBERNETES_RUNNER_SECURITY_CONTEXT, letting an operator choose how constrained the run container is, using the level names from the Kubernetes Pod Security Standards.The default leaves the security context unset, so existing deployments are unaffected, and each level is a config change rather than a deploy.
Levels
baselineconstrains what the container may do, and makes no assumptions about the image it runs.restrictedadditionally pins the user the container runs as, fromKUBERNETES_RUNNER_RUN_AS_USER(default 1000). Taking the uid from configuration rather than from the image means the level applies uniformly across every image already deployed, with nothing needing to be rebuilt or redeployed to pick it up.Placement
capabilities,allowPrivilegeEscalation,runAsNonRootandrunAsUserare all accepted at container level, so they live in one place on the run container rather than being split across the pod and container specs.Tests
runnerSecurityContextis covered at each level. Full supervisor suite: 260 passed, 22 skipped.No changeset or
.server-changes: the default preserves current behaviour.