-
Notifications
You must be signed in to change notification settings - Fork 589
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
feat(admission): validate path with regex supplied in Ingress #4647
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ca52cf2
to
e5e823a
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #4647 +/- ##
=======================================
- Coverage 68.1% 67.7% -0.4%
=======================================
Files 162 164 +2
Lines 19028 19130 +102
=======================================
- Hits 12969 12966 -3
- Misses 5290 5392 +102
- Partials 769 772 +3
☔ View full report in Codecov by Sentry. |
czeslavo
reviewed
Sep 12, 2023
8584b7a
to
b127b6c
Compare
czeslavo
approved these changes
Sep 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Introduce custom validation for
Ingress
object:Ingress
pathsWhich issue this PR fixes:
Closes #4557
Special notes for your reviewer:
Run also test suit manually for Kong Gateway
< 3.0
-kong-gateway:2.8.4.2
on this branch to ensure that integration tests that rely on messages returned from the Gateway are compatiblerun-integration-tests
is relevant (it takes KIC code from the branch, not run it from prebuild container imagelatest
)Since integration tests are run in a matrix for expressions router and old ones it can be covered with tests that are exclusively run when the particular router is used.
Using two class matches
ingressClassMatcher
andingressV1ClassMatcher
replicates the approach used in other parts of the codebase. Refactoring this everywhere in separate PR in my opinion is worth consideration.Also moving the whole
internal/validation
tointernal/admission/validation
is something to consider too.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