-
Notifications
You must be signed in to change notification settings - Fork 448
feat: HTTP Route Support #2293
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
base: master
Are you sure you want to change the base?
feat: HTTP Route Support #2293
Conversation
8acb2a0 to
87a6cac
Compare
3e34acd to
0991d9b
Compare
Co-Authored-By: Aleksei Sviridkin <[email protected]> Co-Authored-By: sure <[email protected]>
0991d9b to
64bf7c7
Compare
|
E2E tests do not offer any advantage to integration tests in this case as we can fully cover everything in there so I omitted them for now |
weisdd
left a comment
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've added a couple of minor recommendations (not affecting the functionality itself), the rest is great.
| return r.reconcileRoute(ctx, cr, vars, scheme) | ||
| } | ||
|
|
||
| if cr.Spec.HTTPRoute != nil { |
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.
At first, I thought we should extend the IngressReconciler struct in the same way as for OpenShift (to add a field hasGatewayAPI), but it's actually smarter to have things as they are, so the operator can potentially start successfully reconciling instances with HTTPRoutes once the CRD is installed without the need for immediate restart.
Let's add a comment stating that it's all intentional, so nobody gets confused when revising the code later.
| mgrOptions.Cache.ByObject[&routev1.Route{}] = cacheLabelConfig | ||
| } | ||
|
|
||
| if hasGatewayAPI { |
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.
In case of a delayed CRD installation, caching will not get fine-tuned for HTTPRoutes. I think we should add a log message saying something along the lines: "Caching fine-tuning is skipped for HTTPRoutes, because gateway.networking.k8s.io CRD is not currently present in the cluster".
This PR combines the best parts of #2283 and #2026.
Only adds management of
HTTPRouteresources. Decisions on how to handlePreferIngressare to be made in #2284.