Skip to content

Conversation

@theSuess
Copy link
Collaborator

This PR combines the best parts of #2283 and #2026.

Only adds management of HTTPRoute resources. Decisions on how to handle PreferIngress are to be made in #2284.

@theSuess theSuess force-pushed the push-wrysouumqzvt branch 3 times, most recently from 8acb2a0 to 87a6cac Compare November 12, 2025 07:58
@github-actions github-actions bot added the documentation Issues relating to documentation, missing, non-clear etc. label Nov 12, 2025
@theSuess
Copy link
Collaborator Author

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

Copy link
Collaborator

@weisdd weisdd left a 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 {
Copy link
Collaborator

@weisdd weisdd Nov 12, 2025

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 {
Copy link
Collaborator

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".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Issues relating to documentation, missing, non-clear etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants