Skip to content
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

OpenShift 4.0 splits OAuth provider out of REST API URL host. #257

Merged

Conversation

GrahamDumpleton
Copy link
Contributor

@GrahamDumpleton GrahamDumpleton commented Apr 8, 2019

From OpenShift 4.0, the OAuth provider and Kube REST API are not on the same URL. It is necessary to specify them separately via distinct environment variables.

Prior to OpenShift 4.0, you set the the single OPENSHIFT_URL environment variable. For OpenShift 4.0+, you now would need to set OPENSHIFT_AUTH_API_URL and OPENSHIFT_REST_API_URL.

This change also updates the URL path for the REST API query for user information, to use new namespaced URL path convention supported by Kubernetes. This is because old URL path no longer works in OpenShift 4.0+.

This change will mean the current code will no longer work for OpenShift versions older than 3.6. That OpenShift version is quite old now, and so seen as acceptable to make change. If someone really needs to use this with OpenShift 3.5 or older, then can override:

OpenShiftOAuthenticator.users_rest_api_path

from JupyterHub config file, setting it back to older path of:

/oapi/v1/users/~

Note that the Jupyter on OpenShift project's deployment method for JupyterHub likely will not work for versions older that OpenShift 3.6, so unlikely this situation would arise, unless someone has been maintaining there own way of deploying JupyterHub to OpenShift.

@minrk
Copy link
Member

minrk commented Apr 23, 2019

Makes sense. Looks like the openshift test needs updating for the new URLs, but otherwise 👍

@minrk minrk merged commit 9ba6c30 into jupyterhub:master May 3, 2019
@minrk
Copy link
Member

minrk commented May 3, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants