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

Backport of APIGW: Routes with duplicate parents should be invalid into release/1.15.x #16962

Conversation

hc-github-team-consul-core
Copy link
Collaborator

Backport

This PR is auto-generated from #16926 to be assessed for backporting due to the inclusion of the label backport/1.15.

WARNING automatic cherry-pick of commits failed. Commits will require human attention.

merge conflict error: unable to process merge commit: "5087f45c93818d929b74ba482ff4bbb5278339cb", automatic backport requires rebase workflow

The below text is copied from the body of the original PR.


Description

We currently don't validate that routes cannot have duplicate parents. This change introduces validations to ensure parents are unique according to the k8s gateway spec https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.CommonRouteSpec

Of note: we reached out to the k8's sig for clarification on some potential edge cases: kubernetes-sigs/gateway-api#1925
depending on the result of that this code may change in the future.

Testing & Reproduction steps

Run the ./start.sh script from here https://github.com/jm96441n/consul-experiments/tree/main/vm/basic-api-gateway (this assumes you have run the convoy-build script at the root of the repo and have built a consul image locally). You will see the route be successfully added, rebuild the images with the changes in this branch and you will see the route fail to be entered.

Links

k8s parent refs docs

PR Checklist

  • updated test coverage
  • external facing docs updated
  • not a security concern

Overview of commits

@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/jm96441n/route-status-multiple-identical-parents/secretly-unified-moray branch from 11cae51 to d396f79 Compare April 11, 2023 16:07
@hc-github-team-consul-core hc-github-team-consul-core force-pushed the backport/jm96441n/route-status-multiple-identical-parents/secretly-unified-moray branch from 555389a to b922846 Compare April 11, 2023 16:07
Copy link
Collaborator

Choose a reason for hiding this comment

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

Auto approved Consul Bot automated PR

@jm96441n jm96441n marked this pull request as ready for review April 11, 2023 16:12
@jm96441n jm96441n enabled auto-merge (squash) April 11, 2023 16:13
@jm96441n jm96441n merged commit 722a8e4 into release/1.15.x Apr 11, 2023
@jm96441n jm96441n deleted the backport/jm96441n/route-status-multiple-identical-parents/secretly-unified-moray branch April 11, 2023 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants