-
Notifications
You must be signed in to change notification settings - Fork 689
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
Add Accepted condition to BackendTLSPolicy #6151
Add Accepted condition to BackendTLSPolicy #6151
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #6151 +/- ##
==========================================
+ Coverage 78.58% 79.45% +0.87%
==========================================
Files 141 142 +1
Lines 20187 16219 -3968
==========================================
- Hits 15864 12887 -2977
+ Misses 4012 3019 -993
- Partials 311 313 +2
|
One bit of missing implementation at the moment is adding a condition if the TargetRef is missing or invalid. Couple of open questions to work through:
Any thoughts here @sunjayBhatia @skriss? |
I see This is a bit of a bad experience for users who happen to make a mistake in their target reference config, i.e. typo a name and not see the Policy status get updated but that sounds a bit more like an issue the spec needs to solve (worth opening an issue upstream perhaps). Up for interpretation but I don't think it is the responsibility of every Gateway implementation to reconcile every instance of a Policy resource kind it knows about that shows up in the cluster, because as you say, it could be related to a completely different implementations Gateway/etc. |
Opened an issue here: kubernetes-sigs/gateway-api#2755 |
43e3205
to
248c895
Compare
248c895
to
4bfc825
Compare
Thanks for the feedback @sunjayBhatia! Addressed all feedback and it should be ready for another review. |
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.
As far as I can tell, just one last tiny thing to add otherwise looks great 👍🏽
Signed-off-by: Christian Ang <christian.ang@broadcom.com>
4bfc825
to
d5d71cb
Compare
@projectcontour/maintainers any thoughts about getting this into 1.28? |
I haven't had a chance to review but if you're happy with it I'm fine with including. |
This PR adds the Accepted Condition to the BackendTLSPolicy.
The Status contains an array of Ancestor Policy Statuses. The Ancestor Ref will be set to the gateway similar to what happens on routes now.
If the BackendTLSPolicy is successfully applied to the Gateway for a given HTTPRoute and Backend Service the "Accepted" condition status will be set to true with the "Accepted" Reason.
If the BackendTLSPolicy is found, but is invalid due to any validation reasons (e.g unsupported certRefs, missing certs, malformed hostname, etc) the status will be set to false with the "Invalid" Reason.
Fixes #6137