-
Notifications
You must be signed in to change notification settings - Fork 588
BackendTLSPolicy conformance tests for ResolvedRefs status condition #4010
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
BackendTLSPolicy conformance tests for ResolvedRefs status condition #4010
Conversation
a6c17e9
to
8dd5b74
Compare
Signed-off-by: Norwin Schnyder <[email protected]>
8dd5b74
to
5ea56fc
Compare
conformance/tests/backendtlspolicy-invalid-ca-certificate-ref.go
Outdated
Show resolved
Hide resolved
Signed-off-by: Norwin Schnyder <[email protected]>
a9f5c10
to
357342b
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 for the PR, LGTM
/lgtm |
/assign @LiorLieberman |
/assign @shaneutt |
357342b
to
64ce80a
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 for taking the time to do this @snorwin 👍
My initial pass looked good, have we tried to run these tests on an implementation yet?
@shaneutt it's not possible to verify this with an actual implementation, as the required API changes will be released in |
I was testing against envoy gateway, but due to the lack of resolvedRefs conditions it is not passing as well. |
|
||
kubernetes.NamespacesMustBeReady(t, suite.Client, suite.TimeoutConfig, []string{ns}) | ||
gwAddr := kubernetes.GatewayAndRoutesMustBeAccepted(t, suite.Client, suite.TimeoutConfig, suite.ControllerName, kubernetes.NewGatewayRef(gwNN), &gatewayv1.HTTPRoute{}, false, routeNN) | ||
kubernetes.HTTPRouteMustHaveResolvedRefsConditionsTrue(t, suite.Client, suite.TimeoutConfig, routeNN, gwNN) |
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.
Is this right? Per the manifest, you are applying a backend that has failure already on backendtlspolicy, resulting on the following condition on HTTPRoute
- lastTransitionTime: "2025-08-25T20:27:03Z"
message: |-
Failed to process route rule 0 backendRef 0: configmap nonexistent-ca-certificate not found in namespace gateway-conformance-infra.
Failed to process route rule 1 backendRef 0: no ca found in configmap malformed-ca-certificate.
observedGeneration: 1
reason: InvalidBackendTLS
status: "False"
type: ResolvedRefs
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.
Pretty sure that is implementation specific behavior, I don't remember defining that in the BackendTLSPolicy GEP at all.
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.
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 removed the assertion on the HTTPRoute since it is not specified whether the invalid ResolvedRefs status condition on the BackendTLSPolicy should be propagated to the HTTPRoute or not.
Should I add an assertion that the HTTPRoute is at least accepted, or does an invalid BackendTLSPolicy also influence its acceptance? - Already done.
/cc @kl52752
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 for removing that.This question requires new GEP. I think that you can just leave TODO to address this issue later.
@snorwin a comment on the new cases, the initial test is already failing because at least on envoy gateway, the backendtlspolicy failure to resolve the configmap causes the httproute to have a problem on resolvedrefs. |
8c5ec61
to
d400d84
Compare
Signed-off-by: Norwin Schnyder <[email protected]>
d400d84
to
a8a865f
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.
Looks good to me, again :)
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 @snorwin I think this looks good.
/approve
It shouldn't block us merging this, but as I understand it it's difficult to test this with implementations right now because no implementations actually follow the resolvedRefs correctly....
So what I would like to do @snorwin is have some kind of follow up where we engage with implementations and get more feedback as soon as we can. Would you mind putting an item on the agenda for our community call today to ask for implementations to implement and try the tests? (if you wont be there today though, I can field it just let me know)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kl52752, shaneutt, snorwin 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 test
/area conformance-test
What this PR does / why we need it:
This test covers the following scenarios:
ConfigMap
ConfigMap
Which issue(s) this PR fixes:
Fixes #3993
Does this PR introduce a user-facing change?: