Skip to content
This repository has been archived by the owner on Mar 17, 2023. It is now read-only.

Commit

Permalink
Set OpenShift env vars in main startup sh
Browse files Browse the repository at this point in the history
  • Loading branch information
vpavlin committed Aug 4, 2020
1 parent a294175 commit d1e10a8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
7 changes: 0 additions & 7 deletions jupyterhub_config-workspace.sh
Original file line number Diff line number Diff line change
@@ -1,7 +0,0 @@
KUBERNETES_SERVER_URL="https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT"
OAUTH_METADATA_URL="$KUBERNETES_SERVER_URL/.well-known/oauth-authorization-server"
OAUTH_ISSUER_ADDRESS=`curl -ks $OAUTH_METADATA_URL | grep '"issuer":' | sed -e 's%.*https://%https://%' -e 's%",%%'`

export OPENSHIFT_URL=$OAUTH_ISSUER_ADDRESS
export OPENSHIFT_REST_API_URL=$KUBERNETES_SERVER_URL
export OPENSHIFT_AUTH_API_URL=$OAUTH_ISSUER_ADDRESS
8 changes: 8 additions & 0 deletions jupyterhub_config.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
KUBERNETES_SERVER_URL="https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT"
OAUTH_METADATA_URL="$KUBERNETES_SERVER_URL/.well-known/oauth-authorization-server"
OAUTH_ISSUER_ADDRESS=`curl -ks $OAUTH_METADATA_URL | grep '"issuer":' | sed -e 's%.*https://%https://%' -e 's%",%%'`

export OPENSHIFT_URL=$OAUTH_ISSUER_ADDRESS
export OPENSHIFT_REST_API_URL=$KUBERNETES_SERVER_URL
export OPENSHIFT_AUTH_API_URL=$OAUTH_ISSUER_ADDRESS

if [ x"$CONFIGURATION_TYPE" != x"" ]; then
if [ -f /opt/app-root/etc/jupyterhub_config-$CONFIGURATION_TYPE.sh ]; then
. /opt/app-root/etc/jupyterhub_config-$CONFIGURATION_TYPE.sh
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
kubernetes==9.0.1
jupyterhub==1.0.0
#jupyterhub-kubespawner==0.10.1
git+https://github.com/jupyterhub/kubespawner.git@a945ef01410867b39e0c174d362a8702bbaa15e9#egg=jupyterhub-kubespawner
jupyterhub==1.1.0
jupyterhub-kubespawner==0.12.0
#git+https://github.com/jupyterhub/kubespawner.git@a945ef01410867b39e0c174d362a8702bbaa15e9#egg=jupyterhub-kubespawner
git+https://github.com/jupyterhub/wrapspawner.git@5f2b7075f77d0c1c49066682a8e8adad0dab76db
jupyterhub-tmpauthenticator==0.6
oauthenticator==0.9.0
oauthenticator==0.11.0
jupyterhub-ldapauthenticator==1.2.2
psycopg2==2.8.4
openshift==0.10.0
Expand Down

0 comments on commit d1e10a8

Please sign in to comment.