-
Notifications
You must be signed in to change notification settings - Fork 472
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
Improve the Gateway ResolvedRefs
condition documentation
#1419
Improve the Gateway ResolvedRefs
condition documentation
#1419
Conversation
Hi @mlavacca. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
614abc7
to
1144ce7
Compare
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.
Thanks @mlavacca! Would like to get @youngnick's review on this as well.
/cc @youngnick
apis/v1alpha2/gateway_types.go
Outdated
// one of the Listener's Routes references an object in another namespace, | ||
// where the object in the other namespace does not have a ReferenceGrant | ||
// explicitly allowing the reference. The unpermitted reference can be | ||
// either a BackendRef, or a CertificateRef. |
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.
A couple thoughts that are
- It seems strange for this to extend to invalid references in attached routes. Maybe @youngnick has been thinking about this as part of the broader conditions update he's working on?
- It seems like cross-namespace references that are not allowed by a ReferenceGrant should always receive the RefNotPermitted reason, regardless of if the Secret actually exists.
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.
- It seems like cross-namespace references that are not allowed by a ReferenceGrant should always receive the RefNotPermitted reason, regardless of if the Secret actually exists.
In this case, we should decide which reason has the highest severity: RefNotPermitted
or InvalidCertificateRef
. In my opinion, if no reference is allowed, the reason should beRefNotPermitted
, no matter if the secret exists or is valid.
@robscott Do you agree/disagree or think that it is not clear by reading the description?
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.
I agree with what you're suggesting in this comment, I think this PR still needs some work to make that clear in the spec.
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.
- It seems strange for this to extend to invalid references in attached routes. Maybe @youngnick has been thinking about this as part of the broader conditions update he's working on?
I just figured out that the previous comment here was copy-paste from the RouteReasonRefNotPermitted
:
gateway-api/apis/v1beta1/shared_types.go
Lines 247 to 251 in 1e037bb
// This reason is used with the "ResolvedRefs" condition when | |
// one of the Listener's Routes has a BackendRef to an object in | |
// another namespace, where the object in the other namespace does | |
// not have a ReferenceGrant explicitly allowing the reference. | |
RouteReasonRefNotPermitted RouteConditionReason = "RefNotPermitted" |
And it doesn't make any sense here; it misled me. The only reason to have RefNotPermitted
should be the reference to an ungranted secret. So I'm going to fix it.
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.
I addressed both your points, it should be clearer now.
@mlavacca Can you change the PR title to be a bit more descriptive? Easy to lose track of this PR when looking through the list. |
ResolvedRefs
condition documentation
/ok-to-test |
6195c10
to
d2ea1f2
Compare
d2ea1f2
to
fcf09f2
Compare
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.
The ListenerReasonRefNotPermitted
changes LGTM, and I proposed a phrasing tweak to hopefully clarify ListenerReasonInvalidCertificateRef
a bit more.
Thanks for your work on this @mlavacca, this feels pretty close now and a good clarification!
The ListenerReasonRefNotPermitted documentation has been improved to specify that this reason can be triggered by either an unpermitted BackendRef or an unpermitted CertificateRef. Besides, the ListenerReasonInvalidCertificateRef documentation has been improved to specify better what makes a listener CertificateRef invalid. Signed-off-by: Mattia Lavacca <lavacca.mattia@gmail.com>
fcf09f2
to
a9ff76e
Compare
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.
/lgtm
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.
Thanks @mlavacca, this is a great improvement!
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mikemorris, mlavacca, robscott The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind documentation
What this PR does / why we need it:
The
ListenerReasonRefNotPermitted
documentation has been improved to specify that this reason can be triggered by either an unpermittedBackendRef
or an unpermittedCertificateRef
. Besides, theListenerReasonInvalidCertificateRef
documentation has been improved to specify better what makes a listenerCertificateRef
invalidWhich issue(s) this PR fixes:
Fixes #1362
Does this PR introduce a user-facing change?: