From 45bfe6c558ce55114a904abc89d8315a0520bb68 Mon Sep 17 00:00:00 2001 From: Masaki Yatsu Date: Wed, 3 Sep 2025 13:39:09 +0900 Subject: [PATCH] feat(jupyterhub): support installing w/o longhorn --- jupyterhub/jupyterhub-values.gomplate.yaml | 4 +++- jupyterhub/justfile | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jupyterhub/jupyterhub-values.gomplate.yaml b/jupyterhub/jupyterhub-values.gomplate.yaml index bb81f67..dc74e3c 100644 --- a/jupyterhub/jupyterhub-values.gomplate.yaml +++ b/jupyterhub/jupyterhub-values.gomplate.yaml @@ -131,7 +131,9 @@ singleuser: {{ else -}} type: dynamic dynamic: - storageClass: longhorn + {{ if env.Getenv "JUPYTERHUB_STORAGE_CLASS" -}} + storageClass: {{ .Env.JUPYTERHUB_STORAGE_CLASS }} + {{ end -}} storageAccessModes: - ReadWriteOnce {{ end -}} diff --git a/jupyterhub/justfile b/jupyterhub/justfile index a8fe30a..b7f9361 100644 --- a/jupyterhub/justfile +++ b/jupyterhub/justfile @@ -6,6 +6,7 @@ export JUPYTERHUB_OIDC_CLIENT_ID := env("JUPYTERHUB_OIDC_CLIENT_ID", "jupyterhub export JUPYTERHUB_OIDC_CLIENT_SESSION_IDLE := env("JUPYTERHUB_OIDC_CLIENT_SESSION_IDLE", "86400") export JUPYTERHUB_OIDC_CLIENT_SESSION_MAX := env("JUPYTERHUB_OIDC_CLIENT_SESSION_MAX", "604800") export JUPYTERHUB_NFS_PV_ENABLED := env("JUPYTERHUB_NFS_PV_ENABLED", "") +export JUPYTERHUB_STORAGE_CLASS := env("JUPYTERHUB_STORAGE_CLASS", "") export JUPYTERHUB_VAULT_INTEGRATION_ENABLED := env("JUPYTERHUB_VAULT_INTEGRATION_ENABLED", "") export JUPYTER_PYTHON_KERNEL_TAG := env("JUPYTER_PYTHON_KERNEL_TAG", "python-3.12-24") export KERNEL_IMAGE_BUUN_STACK_REPOSITORY := env("KERNEL_IMAGE_BUUN_STACK_REPOSITORY", "buun-stack-notebook") @@ -91,6 +92,7 @@ install: echo "Longhorn is not installed. Please install Longhorn first." >&2 exit 1 fi + JUPYTERHUB_STORAGE_CLASS=${JUPYTERHUB_STORAGE_CLASS:-longhorn} export JUPYTER_NFS_IP=${JUPYTER_NFS_IP:-} while [ -z "${JUPYTER_NFS_IP}" ]; do JUPYTER_NFS_IP=$(