-
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: validate HTTPRoute features #5312
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5312 +/- ##
=====================================
Coverage 75.9% 76.0%
=====================================
Files 170 170
Lines 19549 19589 +40
=====================================
+ Hits 14845 14894 +49
+ Misses 3865 3858 -7
+ Partials 839 837 -2 ☔ View full report in Codecov by Sentry. |
27bfcd8
to
a20e8a5
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.
I left some comments in the PR. In addition to them, I'd suggest that we keep the validateHTTPRouteFeatures
function for real features validation (timeouts, filters, etc.) and we extract parentRefs
group/kind and backendRefs
group/kind validation into proper functions, as I do not think they are not proper "features", but instead accepted values for specific fields. What do you think?
I prefer to extract the validation of ParentRefs in HTTPRoutes out because this should be validated before we fetch the gateway from parentRefs. So we have the reason to extract it out and run it before validating process reaches But I think supported kinds of backend is also a "feature". Consider that in some future versions we also support |
a20e8a5
to
9ea2db1
Compare
What this PR does / why we need it:
Validate features in spec of
HTTPRoute
and reject the HTTPRoutes using unspported features.Which issue this PR fixes:
fixes #5253
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