Moving from v1 to v2 is IngressRoute mandatory?

I am moving from v1 to v2 but it wasn't clear to me if the following was mandatory
Converting Ingress to IngressRoute.
I have an annotation:
traefik.ingress.kubernetes.io/preserve-host: false
The migration tool suggested that has to be created manually and refers me back to the CRD page. Is this suggesting that I can only move to 2.4 if I use the CRD?
I'm not too clear about the other steps required to move from 1.7 to 2.4 apart from the fact that I can use YAML config file instead of TOML.

Hello @trafficker
I recommend you use the latest version of Traefik. Saying v2 we mean version 2.2.x, 2.4.x that all of those includes CRD but again use the newest version that is available.

The annotation traefik.ingress.kubernetes.io/preserve-host was used in v1 and in the newest version of Traefik (v2) we use passHostHeader that is set to true by default.

https://doc.traefik.io/traefik/routing/services/#pass-host-header

I hope that helps.

Thank you

@jakubhajek
That was helpful. One last thing: I have the preserve-host set for each ingress resource as an annotation. To do the same for IngressRoute, where do I place the passHostHeader = true in ingressRoute I don't want to set it in the toml as it would be enforced globally. I want it set for the ingressRoute resources only.

hey @trafficker

The attribute passHostHeader is implemented on the services level.
Here is the link to IngressRoute documentation where you can find all available attributes.

I hope that helps, Thanks :wink: