crc-org / crc

CRC is a tool to help you run containers. It manages a local OpenShift 4.x cluster, Microshift or a Podman VM optimized for testing and development purposes
https://crc.dev
Apache License 2.0
1.25k stars 236 forks source link

investigate if we can set `appsDomain` in ingress config to `nip.io` #4275

Closed gbraad closed 1 week ago

praveenkumar commented 1 month ago

https://github.com/crc-org/crc-cloud/blob/main/pkg/bundle/setup/clustersetup.sh#L268-L280 this is what all we do for crc-cloud.

anjannath commented 1 month ago

https://github.com/crc-org/crc-cloud/blob/main/pkg/bundle/setup/clustersetup.sh#L268-L280 this is what all we do for crc-cloud.

To change the domain used by routes for user deployed apps, only part of the changes are needed, the patches here are also modifying the route for the web-console and the oauth service. and while testing it was seen that changing them is not required, but it'd be good to change it to keep it consistent i guess.

ultimately we'll expose a config option for the user to switch to using routes based on nip.io, but for this to work the cluster has to be in a running state, so the config validation should check if the cluster is running and only then allow to set it

praveenkumar commented 1 month ago

https://github.com/crc-org/crc-cloud/blob/main/pkg/bundle/setup/clustersetup.sh#L268-L280 this is what all we do for crc-cloud.

To change the domain used by routes for user deployed apps, only part of the changes are needed, the patches here are also modifying the route for the web-console and the oauth service. and while testing it was seen that changing them is not required, but it'd be good to change it to keep it consistent i guess.

we modify oauth because the api endpoints also works on nip.io so oauth service should aware of it and web-console one to make sure user able to get console otherwise it will not work. If user only care about apps to be routed on different domain instead console and api then sure we don't need it but if issue with admin helper then how does existing routes are resolved?

praveenkumar commented 1 month ago

Also we need to keep in the mind how much extra time it adds for the user. On crc-cloud we don't have any other option to access the apiserver so we have to take that into account but here if admin-helper is not working that means issue is with admin-helper which need fix.

anjannath commented 1 month ago

https://github.com/crc-org/crc-cloud/blob/main/pkg/bundle/setup/clustersetup.sh#L268-L280 this is what all we do for crc-cloud.

To change the domain used by routes for user deployed apps, only part of the changes are needed, the patches here are also modifying the route for the web-console and the oauth service. and while testing it was seen that changing them is not required, but it'd be good to change it to keep it consistent i guess.

we modify oauth because the api endpoints also works on nip.io so oauth service should aware of it and web-console one to make sure user able to get console otherwise it will not work.

while testing, i saw that the web-console was working with the old existing route

If user only care about apps to be routed on different domain instead console and api then sure we don't need it but if issue with admin helper then how does existing routes are resolved?

yeah right, even existing routes will not work, so everything has to be changed, and api.crc.testing cannot be changed so this'd not solve issues for users without working admin-helper

anjannath commented 1 week ago

It was decided to not automate this as this might increase the start up time, have a wiki article about enabling this: https://github.com/crc-org/crc/wiki/Change-the-domain-for-CRC