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

gateway-api: Support for BackendRef filters #30090

Merged
merged 1 commit into from Jan 30, 2024

Conversation

chaunceyjiang
Copy link
Member

Fixes: #29080

Please ensure your pull request adheres to the following guidelines:

Gateway API BackendRef filters support

@maintainer-s-little-helper maintainer-s-little-helper bot added the dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. label Jan 3, 2024
@chaunceyjiang chaunceyjiang marked this pull request as ready for review January 3, 2024 16:42
@chaunceyjiang chaunceyjiang requested a review from a team as a code owner January 3, 2024 16:42
@chaunceyjiang
Copy link
Member Author

/test

@acelinkio
Copy link

Confirmed this fix works!

Tested by deploying the 1.15.0-rc0 helm chart and using the container image generated in the PR workflow (https://github.com/cilium/cilium/actions/runs/7399979212/job/20132600608). values

operator:
  image:
   override: "quay.io/cilium/operator-generic-ci:a199ad6584be1047dc480e82b87d0e54ad008c24"

@meyskens meyskens added release-note/minor This PR changes functionality that users may find relevant to operating Cilium. area/servicemesh GH issues or PRs regarding servicemesh feature/k8s-gateway-api labels Jan 5, 2024
@maintainer-s-little-helper maintainer-s-little-helper bot removed dont-merge/needs-release-note-label The author needs to describe the release impact of these changes. labels Jan 5, 2024
Copy link
Contributor

@youngnick youngnick left a comment

Choose a reason for hiding this comment

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

The change looks good with one small query.

However, could you take this chance to add tests?

I think we need a test for one backend with Backend filters, multiple backends with different backend filters, and multiple backends with some with backend filters and some not.

The fixtures for the Gateway will need to be added in operator/pkg/model/ingestion/gateway_fixture_test.go, with the tests in operator/pkg/model/ingestion/gateway_test.go.

Then, you can take the []model.HTTPRoute that you get from that test, and use it as a fixture in operator/pkg/model/translation/fixture_test.go, and test it in operator/pkg/model/translation/translation_test.go.

Sorry to ask for a lot of tests here, but this feature is implementation-specific, so there aren't any tests upstream yet (I think that the tests you add here would be a great basis for optional upstream conformance tests that could move this feature to Extended there).

@chaunceyjiang
Copy link
Member Author

I think we need a test for one backend with Backend filters, multiple backends with different backend filters, and multiple backends with some with backend filters and some not.

Ok, I will try to add some unit tests soon.

Fixes: cilium#29080

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
@chaunceyjiang
Copy link
Member Author

/test

Copy link
Contributor

@youngnick youngnick left a comment

Choose a reason for hiding this comment

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

Nice work on the tests! LGTM.

@youngnick
Copy link
Contributor

/ci-ipsec-upgrade

@youngnick
Copy link
Contributor

/ci-aks

@chaunceyjiang
Copy link
Member Author

/ci-ipsec-upgrade

@chaunceyjiang
Copy link
Member Author

/cc @sayboras @meyskens Please take a look.

Copy link
Member

@sayboras sayboras left a comment

Choose a reason for hiding this comment

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

Thanks a lot

@sayboras sayboras added this pull request to the merge queue Jan 30, 2024
@sayboras sayboras changed the title CFP: Gateway API BackendRef filters support gateway-api: Support for BackendRef filters Jan 30, 2024
Merged via the queue into cilium:main with commit 0390689 Jan 30, 2024
62 checks passed
@acelinkio
Copy link

Hey! Can this be added to the 1.15.2 release? Thanks!

@sayboras sayboras added the needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch label Feb 22, 2024
@YutaroHayakawa YutaroHayakawa mentioned this pull request Feb 27, 2024
9 tasks
@YutaroHayakawa YutaroHayakawa added backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. and removed needs-backport/1.15 This PR / issue needs backporting to the v1.15 branch labels Feb 27, 2024
@github-actions github-actions bot added backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. and removed backport-pending/1.15 The backport for Cilium 1.15.x for this PR is in progress. labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/servicemesh GH issues or PRs regarding servicemesh backport-done/1.15 The backport for Cilium 1.15.x for this PR is done. feature/k8s-gateway-api release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gateway API BackendRef filters support
6 participants