-
Notifications
You must be signed in to change notification settings - Fork 633
fix(status): align BackendTLSPolicy ResolvedRefs reason with Gateway API #7793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix(status): align BackendTLSPolicy ResolvedRefs reason with Gateway API #7793
Conversation
Signed-off-by: Aditya7880900936 <adityasanskarsrivastav788@gmail.com>
9c94d61 to
96c0aab
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7793 +/- ##
==========================================
+ Coverage 72.61% 72.84% +0.22%
==========================================
Files 235 235
Lines 34876 35175 +299
==========================================
+ Hits 25325 25622 +297
+ Misses 7745 7738 -7
- Partials 1806 1815 +9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The conformance test failures appear to be related to GatewayClass acceptance timing ( My change only affects BackendTLSPolicy status reason mapping and does not touch GatewayClass, EnvoyProxy, or control-plane startup logic. Happy to re-run or adjust if maintainers think this is related. |
|
Hi @arkodg , This PR only updates the BackendTLSPolicy status reason mapping; the current failures appear to be unrelated conformance flakes. Happy to rebase, rerun, or adjust based on your guidance. Thanks! |
|
Hi @zirain 👋 Apologies for the ping — just looking for a quick sanity check when you get a chance. This PR aligns BackendTLSPolicy ResolvedRefs status reason with the Gateway API spec. I’ve added context above and can re-run or rebase if needed. |
|
Hi @arkodg , This PR only updates the BackendTLSPolicy status reason mapping; the current failures appear to be unrelated conformance flakes. Happy to rebase, rerun, or adjust based on your guidance. Thanks! |
|
instead of deleting the logic, is there an issue with the current logic of is the right |
|
Hi @arkodg ,
Because of that, the error does not reliably indicate an invalid reference kind per the Gateway API semantics. In practice it represents a CA resolution failure, which the spec and conformance tests map to That’s why I removed the conditional mapping — keying If you think we should distinguish these cases more explicitly, I’m happy to follow up with a separate change that introduces a dedicated error for truly invalid reference kinds. |
|
|
That makes sense 👍 I’ll update I’ll push an updated revision shortly. |
…LSPolicy Signed-off-by: Aditya7880900936 <adityasanskarsrivastav788@gmail.com>
0cb18bc to
6f18744
Compare
|
Hi @arkodg I’ve updated the error classification for CA resolution failures so that missing or unusable CA bundles use a more accurate error, allowing the status to consistently report InvalidCACertificateRef without altering validation logic. All tests pass locally (go test ./..., make test). |
|
This looks good, thanks! Could you confirm that the new conformance test in kubernetes-sigs/gateway-api#4360 passes here? |
|
Hi @jukie @arkodg It looks like the current CI failures are occurring during Helm chart linting, before the Gateway API conformance assertions run. I’ve updated the branch to pick up the latest changes from main and will confirm the result once the conformance tests complete. |
|
|
||
| if ca == "" { | ||
| return nil, ErrBackendTLSPolicyInvalidKind | ||
| return nil, ErrBackendTLSPolicyNoValidCACertificate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more plumbing is needed here
ca == "" could mean a Get returned nothing or it never entered the for loop block or it never entered the switch block
Signed-off-by: Aditya7880900936 <adityasanskarsrivastav788@gmail.com>
08aff65 to
947113b
Compare
|
Hi @arkodg , |
|
Hi @arkodg, just a gentle follow-up in case this got buried. |
|
can you add a test case |
What type of PR is this?
fix: correct BackendTLSPolicy ResolvedRefs reason
What this PR does / why we need it:
Envoy Gateway was setting the
ResolvedRefs=Falsecondition reason toInvalidKindfor BackendTLSPolicy when a referenced CA certificate couldnot be resolved.
According to Gateway API conformance and the BackendTLSPolicy specification,
this scenario must use the
InvalidCACertificateRefreason. This PR updatesthe status reason and adjusts golden test outputs to align with the expected
behavior.
Which issue(s) this PR fixes:
Fixes #7790
Release Notes: No