Repository navigation
fix(provider): index all ExtAuth backendRefs for SecurityPolicy - #10674
Conversation
backendSecurityPolicyIndexFunc indexed only the first entry of ExtAuth HTTP and gRPC backendRefs, although the API allows up to 16 and the translator builds a destination for each one. Service and EndpointSlice events for a backend referenced only as the second or later ExtAuth backendRef were dropped by the reconcile predicates, so Envoy kept stale endpoint IPs for that backend until an unrelated reconcile. Index every ExtAuth backendRef, as was done for OIDC provider backendRefs in envoyproxy#10602. Signed-off-by: Rishabh <[email protected]> Assisted-by: Claude
Assisted-by: Claude Signed-off-by: Rishabh <[email protected]>
✅ Deploy Preview for cerulean-figolla-1f9435 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
✅ Deploy Preview for cerulean-figolla-1f9435 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10674 +/- ##
==========================================
- Coverage 82.86% 82.83% -0.03%
==========================================
Files 278 278
Lines 44620 44620
==========================================
- Hits 36976 36963 -13
- Misses 7643 7656 +13
Partials 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@zhaohuabing could you take a look when you get a chance? CI is green. |
What this PR does / why we need it:
backendSecurityPolicyIndexFuncindexes only the first ExtAuth HTTP or gRPC backendRef, but the API allows up to 16 and the translator builds a destination for each one. So Service and EndpointSlice events for a backend referenced only as the second or later ExtAuth backendRef are dropped by the reconcile predicates, and Envoy keeps that backend's stale endpoint IPs until an unrelated reconcile. This PR indexes every ExtAuth backendRef, the same fix #10602 made for OIDC provider backendRefs (#10601). The two newTestValidateServiceForReconcilecases (HTTP and gRPC, asking about the second backendRef) fail without the change and pass with it.Which issue(s) this PR fixes:
None filed; this is the ExtAuth half of #10601.
PR Checklist
git commit -s). See DCO: Sign your work./api.make generate gen-check,make lint, and the unit-test/coverage build pass. Locally:go test ./internal/provider/kubernetes/...and the envtest integration tests for the package pass, and golangci-lint (repo config),gofmtandgo vetare clean on the package.TestValidateServiceForReconcile.release-notes/current/bug_fixes/10674-extauth-backendrefs-index.md.