feat(api): add PodGroup safeToDisrupt to opt out of consolidation #22
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 230 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.326
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #22"
general
weight: 0.35
sam-huang1223
Description
Adds an optional
PodGroupSpec.SafeToDisrupt(*bool) and thekai.scheduler/safe-to-disruptannotation key, so a workload can opt out of evictions that are not driven by fairness or priority. Today that is the consolidation action, which evicts pods to repack nodes for a pending workload. A workload that does not survive a restart (for example replicas withrestartPolicy: Never, or bare pods) can set it tofalse. Preempt and reclaim are unaffected. Unset meanstrue, so existing PodGroups behave as before.PodGroupSpec.SafeToDisrupt(protobuf tag 11), with the regenerated deepcopy and CRD.ParseSafeToDisrupt, which the pod-grouper uses to read the annotation, as it doesParsePreemptionDelayandParseStalenessGracePeriod.SafeToDisruptAnnotationKey, next to the preemption-delay and staleness-grace-period keys.The pod-grouper and scheduler changes that use these are in kai-scheduler/KAI-Scheduler#2284. Following review there, the field is named
safeToDisruptrather thansafeToConsolidate, so it is not tied to one action. Following kai-scheduler/KAI-Scheduler#1928, the API part lands here first.Related Issues
Part of kai-scheduler/KAI-Scheduler#2283; needed by kai-scheduler/KAI-Scheduler#2284.
Checklist
TestParseSafeToDisruptmake changelogBreaking Changes
None. The field is optional and defaults to
true.Additional Notes
make generate manifests build test lintis clean. The only generated changes are the new field inzz_generated.deepcopy.goand inconfig/crd/scheduling.run.ai_podgroups.yaml.🤖 Generated with Claude Code