OpenShift 4.0 splits OAuth provider out of REST API URL host. #257
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 setOPENSHIFT_AUTH_API_URL
andOPENSHIFT_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:
from JupyterHub config file, setting it back to older path of:
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.