streams-manifests/jupyter/overlays/test/values/values.yaml

97 lines
3.2 KiB
YAML
Raw Normal View History

2025-01-30 13:09:08 +01:00
debug:
enabled: true
hub:
config:
Authenticator:
auto_login: true
enable_auth_state: true
JupyterHub:
tornado_settings:
headers: { 'Content-Security-Policy': "frame-ancestors *;" }
db:
pvc:
storageClassName: csi-sc-cinderplugin
extraConfig:
oauthCode: |
2025-02-03 13:41:31 +01:00
import os
2025-01-30 13:09:08 +01:00
from oauthenticator.generic import GenericOAuthenticator
2025-02-03 13:41:31 +01:00
keycloak_base = 'https://' + os.environ['OAUTH2_HOST'] + '/realms/' + os.environ['OAUTH2_REALM'] + '/protocol/openid-connect'
os.environ['OAUTH2_TOKEN_URL'] = keycloak_base + '/token'
os.environ['OAUTH2_AUTHORIZE_URL'] = keycloak_base + '/auth'
2025-01-30 13:09:08 +01:00
2025-02-03 13:44:35 +01:00
c.JupyterHub.authenticator_class = GenericOAuthenticator
2025-01-30 13:09:08 +01:00
2025-02-03 13:41:31 +01:00
c.OAuthenticator.client_id = os.environ['OAUTH2_CLIENT_ID']
c.OAuthenticator.client_secret = os.environ['OAUTH2_CLIENT_SECRET']
c.GenericOAuthenticator.token_url = os.environ['OAUTH2_TOKEN_URL']
c.GenericOAuthenticator.userdata_url = keycloak_base + '/userinfo'
c.GenericOAuthenticator.userdata_method = 'GET'
c.GenericOAuthenticator.userdata_params = {'state': 'state'}
2025-02-03 14:09:08 +01:00
c.GenericOAuthenticator.username_key = 'preferred_username'
2025-02-03 14:06:08 +01:00
c.GenericOAuthenticator.scope = ['openid', 'profile', 'email']
2025-02-03 13:41:31 +01:00
c.GenericOAuthenticator.admin_users = ['kano', 'benedith']
c.GenericOAuthenticator.allow_all = True
c.GenericOAuthenticator.authorize_url = os.environ['OAUTH2_AUTHORIZE_URL']
c.GenericOAuthenticator.enable_auth_state = True
c.GenericOAuthenticator.login_service = 'Keycloak'
c.GenericOAuthenticator.oauth_callback_url = 'https://' + os.environ['JUPYTER_HOST'] + '/hub/oauth_callback'
c.GenericOAuthenticator.refresh_pre_spawn = True
2025-01-30 13:09:08 +01:00
extraEnv:
JUPYTER_HOST: jupyter-test.streams.sunet.se
JUPYTERHUB_API_KEY:
valueFrom:
secretKeyRef:
name: jupyterhub-secrets
key: api-key
JUPYTERHUB_CRYPT_KEY:
valueFrom:
secretKeyRef:
name: jupyterhub-secrets
key: crypt-key
2025-02-03 13:41:31 +01:00
OAUTH2_CLIENT_ID:
2025-01-30 13:09:08 +01:00
valueFrom:
secretKeyRef:
name: keycloak-oauth-secrets
key: client-id
2025-02-03 13:41:31 +01:00
OAUTH2_CLIENT_SECRET:
2025-01-30 13:09:08 +01:00
valueFrom:
secretKeyRef:
name: keycloak-oauth-secrets
key: client-secret
2025-02-03 13:41:31 +01:00
OAUTH2_HOST: keycloak-test.streams.sunet.se
OAUTH2_REALM: streams
2025-01-30 13:09:08 +01:00
singleuser:
image:
name: quay.io/jupyter/datascience-notebook
tag: python-3.12.8
storage:
dynamic:
storageClass: csi-sc-cinderplugin
extraEnv:
JUPYTER_ENABLE_LAB: "yes"
JUPYTER_HOST: jupyter-test.streams.sunet.se
MINIO_ACCESS_KEY:
valueFrom:
secretKeyRef:
name: minio-credentials
key: MINIO_ACCESS_KEY
MINIO_SECRET_KEY:
valueFrom:
secretKeyRef:
name: minio-credentials
key: MINIO_SECRET_KEY
2025-01-30 13:46:11 +01:00
MINIO_ENDPOINT_URL: "https://s3.dco1.safedc.net"
2025-01-30 13:09:08 +01:00
extraFiles:
jupyter_notebook_config:
mountPath: /home/jovyan/.jupyter/jupyter_server_config.py
stringData: |
import os
c = get_config()
c.NotebookApp.allow_origin = '*'
c.NotebookApp.tornado_settings = {
'headers': { 'Content-Security-Policy': "frame-ancestors *;" }
}
mode: 0644