kubevirteps: derive infra endpoint conditions from the tenant endpoints #421
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.69) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.69 · 464 lines diff across 5 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.367
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.069
Real PR Conversation Timeline
1 comments
"Review active on #421"
general
weight: 0.35
aimnbrs
What this PR does / why we need it:
Fold the conditions of every tenant endpoint on a node:
readyif any is ready,servingif any is serving,terminatingif all are, or if none is ready and one is serving and terminating (the endpoints kube-proxy and Cilium fall back to when none is ready, so a pod that is still starting does not hide a pod that is draining on the same VM). Combine with the VMI phase (ready/servingonly whileRunning;Failed/Succeededis terminating whatever the tenant says). Nil conditions are read as the EndpointSlice API defines them (ready and serving true, terminating false); a terminating endpoint is never counted as ready. Tenant endpoints with nonodeNameare skipped (they dereferenced nil before).No change to how the controller is triggered: the tenant-slice
UpdateFuncalready requeues on every update andEndpointsEqualBeyondHashcompares conditions, so a condition-only change already reaches the infra slice; only what was written into it was wrong.Which issue(s) this PR fixes:
Fixes #420
Special notes for your reviewer:
make test(go test ./pkg/...) passes;go vetandgofmtare clean.kubevirteps_controller_test.go; without this change five fail and the nil-node case panics.preStop5 s): the infra VM left the ready set within about a second of the tenant endpoints, Hubble showed noACK, RST, and the pods kept answering through theirpreStopas serving endpoints — Kubernetes' graceful-termination semantics end to end. The review change toterminatinggives the same result in that case (every endpoint on the VM was terminating).mainafter #417.Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.
Release note:
``
release-note
``The kubevirteps controller derives each infra endpoint's ready, serving and terminating conditions from the tenant endpoints on that VM as well as from the VMI phase. A Running VMI is no longer ready when none of its tenant endpoints is ready: while its pods terminate, but also when their readiness probes fail or the tenant node is NotReady. While none is ready but one is still serving and terminating, the VM is advertised as serving and terminating, so load balancers can fall back to it.