fix(networking): harden webhook policy assumptions - #4058
myasnikovdaniil wants to merge 4 commits into
Conversation
Read the ingress admission port from the effective subchart values and fail if the port is absent. Describe kube-proxy replacement as a required service-routing invariant while retaining target-side enforcement. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <[email protected]>
Probe one exact ready admission EndpointSlice backend throughout the measurement window and reject missing or ambiguous Service ports. Ensure the kubeovn-webhook Helm suites run through package discovery. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <[email protected]>
Limit the fail-open discussion to the actual counterexample: another component translating the Service after Cilium source-side egress policy. A disabled translator by itself leaves no working Service path. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <[email protected]>
Require a real admission ClusterIP and carry the EndpointSlice target UID into the direct-backend coordinate. Tie that coordinate to a non-empty current Pod snapshot so stale endpoints or masked list failures cannot produce a policy verdict. Assisted-By: LLM Signed-off-by: Myasnikov Daniil <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (13)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe changes define ChangesWebhook routing and validation
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The webhook routing assumptions, policy configuration checks, and admission-backend probe validation are aligned without an identified merge-blocking risk. Sequence Diagram(s)sequenceDiagram
participant ChainsawTest
participant AdmissionService
participant EndpointSlices
participant ControllerPod
ChainsawTest->>AdmissionService: Discover ClusterIP and named ports
ChainsawTest->>EndpointSlices: Select a ready backend
ChainsawTest->>ControllerPod: Verify backend identity and restart state
ChainsawTest->>AdmissionService: Probe the ClusterIP
ChainsawTest->>EndpointSlices: Revalidate the selected backend
ChainsawTest->>ControllerPod: Revalidate controller readiness
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (13 skipped: 13 unsupported.) ✨ Finishing Touches🧪 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 |
What this PR does
This is follow-up for #3997. It reads ingress-nginx admission port from effective subchart values and refuses empty value, and fixes
kubeProxyReplacement=falsestatus because cozystack has no supported Service translator in that state. Gateway test now requires one real ClusterIP and keeps same ready Pod UID, IP and port for whole probe, so stale EndpointSlice, replaced Pod or wrong Service can't report deny. Policy selectors and two-ended deny from #3997 stay unchanged, and this does not claim root cause for #3983.Screenshots
Not applicable.
Downstream repositories
Release note
Summary by CodeRabbit
Bug Fixes
Documentation
kubeProxyReplacement: true.Tests