routesopenshiftopenshift-originopenshift-enterpriseokd

How to change the route url of openshift oauth authentication?


Openshift Version: 4.7

I'm trying to update the route url of the openshift webconsole and openshift OAuth athentication. I could successfully do it for openshift console by using

oc edit route.route.openshift.io/console -n openshift-console

Changed console-openshift-console.apps.lab.okd.local to console-openshift-console.apps.lab.okd.local.<service-node-ip>.nip.io

This worked. Here my intension to add nip.io is to eliminate the manual host entries.

Now I need to change the route url of the openshift oauth as well because login to openshift webconsole redirects the page to openshift OAuth. I tried to update the route url using:

oc edit route.route.openshift.io/oauth-openshift -n openshift-authentication

But once I update the route url from oauth-openshift.apps.lab.okd.local to oauth-openshift.apps.lab.okd.local.<service-node-ip>.nip.io and save, the changes gets reverted to original.


Solution

  • You can not directly edit thisrouteas it is managed by an operator and as soon as the operator detects a change in the objects it manages, it reset them. This is the standard operator way of working
    As for changing the OAuth URL, you can do it with OCP v4.9 as described here: Customizing the internal OAuth server URL
    It is announced in v4.9 release notes here: Customizing the OAuth server URL
    I don't think it is possible to do it before OCP v4.9