-
Notifications
You must be signed in to change notification settings - Fork 594
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
fix(translate) use Ingress-specific regex prefix #2956
Conversation
4c4c632
to
5f8dbc5
Compare
5f8dbc5
to
babc24a
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.
generally LGTM, nut some minor discussions on code clearity.
Can we add a tests, that overrides the |
Translate between an Ingress-compatible regex prefix and the Kong regex prefix. Allow users to override the default regex prefix. Add tests for regex Ingress paths using the prefix.
babc24a
to
d02fd2d
Compare
Move non-legacy logic inside maybePrependPrefix. Add a test for a default prefix path on an Ingress that overrides the prefix. Further CHANGELOG updates.
d02fd2d
to
eb5569f
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
What this PR does / why we need it:
Translate between an Ingress-compatible regex prefix and the Kong regex prefix. Allow users to override the default regex prefix using an annotation.
Add tests for regex Ingress paths using the prefix.
By default, Ingress paths beginning with
/~
will translate to Kong route paths beginning with~
. This functionality is not version-gated, with the expectation that such paths are uncommon in the wild. For users that do need these paths translated verbatim, overriding the prefix with thekonghq.com/regex-prefix
allows you to preserve/~
-prefixed paths as they are.Which issue this PR fixes:
Fix #2945
Special notes for your reviewer:
PR Readiness Checklist:
Complete these before marking the PR as
ready to review
:CHANGELOG.md
release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR