Skip to content
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

Backendref httproute filter request redirect #3134

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

arnaud-tincelin
Copy link

What type of PR is this?
/kind test
/area conformance

What this PR does / why we need it:

Which issue(s) this PR fixes:
#2936

Does this PR introduce a user-facing change?:

NONE

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/test area/conformance labels Jun 5, 2024
Copy link

linux-foundation-easycla bot commented Jun 5, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Jun 5, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: arnaud-tincelin
Once this PR has been reviewed and has the lgtm label, please assign danwinship for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

Welcome @arnaud-tincelin!

It looks like this is your first PR to kubernetes-sigs/gateway-api 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/gateway-api has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 5, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @arnaud-tincelin. 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 /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jun 5, 2024
Copy link
Member

@mlavacca mlavacca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR, @arnaud-tincelin!

I left some more specific comments in the review, but from a general standpoint I'd like to ask you to stick to the approach posed by the FilterRedirect tests we already have in place:

In this test you are only testing path redirect, which is fine but we should highlight this aspect in the file name and tests names.

Have you tested this against any implementation?

Description: "A single HTTPRoute with a redirection filter for different backends",
Features: []features.SupportedFeature{
features.SupportGateway,
features.SupportHTTPRoute,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add here the new feature SupportHTTPRouteFilterRequestRedirect.

port: 8080
filters:
- type: FilterRequestRedirect
filterRequestRedirect:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the filter name is just requestRedirect

@@ -150,6 +150,9 @@ const (

// This option indicates support for HTTPRoute with a backendref with an appProtoocol 'kubernetes.io/ws' (extended conformance)
SupportHTTPRouteBackendProtocolWebSocket SupportedFeature = "HTTPRouteBackendProtocolWebSocket"

// This option indicates support for HTTPRoute filter request redirect (extended conformance)
SupportHTTPRouteFilterRequestRedirect SupportedFeature = "HTTPRouteFilterRequestRedirect"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this test is about backend filters, and we already have the SupportHTTPRoute*Redirect features in place, I'd suggest to rename this one to SupportHTTPRouteBackendPathRedirect. The same renaming should be applied to the tests.

@arnaud-tincelin
Copy link
Author

thank you @mlavacca, it's a lot clearer!

I am still working on the code based on your comments and I am trying to run the tests on an AKS with istio gateway or azure gateway but in both cases the tests end up in timeout. Is there something I am missing?

The tests seem to be stuck on this:

helpers.go:223: 2024-06-06T11:26:27.841628413+02:00: gateway-conformance-infra/gateway-add-listener Gateway not Accepted yet
    helpers.go:222: 2024-06-06T11:26:28.841559903+02:00: Accepted condition set to Status False with Reason Accepted, expected Status True
    helpers.go:222: 2024-06-06T11:26:28.841667255+02:00: Accepted was not in conditions list [[{Accepted False 1 2024-06-06 11:14:31 +0200 CEST Accepted Gateway does not have annotation to reference Application Gateway for Containers resource}]]

and I started the tests with

go test ./conformance -run TestConformance -args \
    --gateway-class=istio \ # or azure-alb-external
    --supported-features=Gateway,HTTPRoute,HTTPRouteBackendPathRedirect`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/conformance cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/test needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants