diff --git a/kube/values/base/config.yaml b/kube/values/base/config.yaml index 81d00e96a0ce15943be4165cdf289723fee72e5d..c7b3949765e6cf00ac0d8d29fe1e688d0727109e 100644 --- a/kube/values/base/config.yaml +++ b/kube/values/base/config.yaml @@ -186,23 +186,23 @@ outpostConfig: |- elif notebook_type == "url" and notebook: spawner.default_url = notebook if spawner.user_options["option"] in ["repo2docker", "custom"]: - # spawner.cmd = ["/bin/sh", "-c"] spawner.cmd = [ + "bash", "-c", ''' # Get the current jupyterhub-singleuser version version=$(jupyterhub-singleuser --version || echo "0.0.0") - + # Set the desired version range min_version="4.0.0" max_version="5.0.0" target_version="4.1.6" - + # Function to check if the version is in range in_range() { [ "$(printf '%s\n' "$min_version" "$1" | sort -V | head -n1)" = "$min_version" ] && \ [ "$(printf '%s\n' "$1" "$max_version" | sort -V | head -n1)" = "$1" ] } - + # Check if the current version is within the range if ! in_range "$version"; then echo "Installing jupyterhub-singleuser $target_version as version $version is not within $min_version - $max_version." @@ -210,7 +210,7 @@ outpostConfig: |- else echo "jupyterhub-singleuser $version is within the required version range." fi - + # Start the jupyterhub-singleuser command -v start-singleuser.sh >/dev/null 2>&1 && exec start-singleuser.sh || exec jupyterhub-singleuser '''