Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing cdsdashboard conda environments being shown #1025

Merged
merged 1 commit into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions qhub/template/stages/07-kubernetes-services/jupyterhub.tf
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ module "jupyterhub" {

conda-store-pvc = module.conda-store-nfs-mount.persistent_volume_claim.name
conda-store-mount = "/home/conda"
conda-store-environments = var.conda-store-environments

extra-mounts = {
"/etc/dask" = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import z2jh

cdsdashboards = z2jh.get_config("custom.cdsdashboards")
conda_store_environments = z2jh.get_config("custom.environments")

if cdsdashboards["enabled"]:
from cdsdashboards.hubextension.spawners.variablekube import VariableKubeSpawner
Expand All @@ -31,9 +32,7 @@
c.CDSDashboardsConfig.spawn_default_options = False

c.CDSDashboardsConfig.conda_envs = [
# {%- for key in cookiecutter.environments %}
# "{{ cookiecutter.environments[key].name }}",
# {%- endfor %}
environment['name'] for _, environment in conda_store_environments.items()
]
else:
c.JupyterHub.allow_named_servers = False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ resource "helm_release" "jupyterhub" {
conda-store-pvc = var.conda-store-pvc
conda-store-mount = var.conda-store-mount
extra-mounts = var.extra-mounts
environments = var.conda-store-environments
}

hub = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,9 @@ variable "cdsdashboards" {
cds_hide_user_dashboard_servers = false
}
}

variable "conda-store-environments" {
description = "conda environments from conda-store in filesystem namespace"
type = map(any)
default = {}
}