Skip to content

Commit

Permalink
Fixup adding back jupyterhub overrides option
Browse files Browse the repository at this point in the history
Prior to #1003 there was the option `jupyterhub.overrides`. Here we
are adding back this option and ensuring that there is documentation
on the option.
  • Loading branch information
costrouc committed Feb 11, 2022
1 parent 24c7721 commit 49f32a8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/source/installation/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,22 @@ QHub will refuse to deploy if it doesn't contain the same version as that of the

Typically, you can upgrade the qhub-config.yaml file itself using the [`qhub upgrade` command](../admin_guide/upgrade.md). This will update image numbers, plus updating qhub_version to match the installed version of `qhub`, as well as any other bespoke changes required.

## JupyterHub

JupyterHub uses the [zero to jupyterhub helm
chart](https://github.com/jupyterhub/zero-to-jupyterhub-k8s/). This
chart has many options that are not configured in the QHub default
installation. You can override specific values in the
[values.yaml](https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/main/jupyterhub/values.yaml). `jupyterhub.overrides`
is optional.

```yaml
jupyterhub:
overrides:
cull:
users: true
```

# Full configuration example

```yaml
Expand Down
3 changes: 3 additions & 0 deletions qhub/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,9 @@ def provision_07_kubernetes_services(stage_outputs, config, check=True):
"jupyterlab-image": split_docker_image_name(
config["default_images"]["jupyterlab"]
),
"jupyterhub-overrides": [
json.dumps(config.get("jupyterhub", {}).get("overrides", {}))
],
# dask-gateway
"dask-gateway-image": split_docker_image_name(
config["default_images"]["dask_gateway"]
Expand Down
8 changes: 8 additions & 0 deletions qhub/template/stages/07-kubernetes-services/jupyterhub.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ variable "jupyterhub-image" {
})
}

variable "jupyterhub-overrides" {
description = "Jupyterhub helm chart overrides"
type = list(string)
default = []
}

variable "jupyterhub-shared-storage" {
description = "JupyterHub shared storage size [GB]"
type = string
Expand Down Expand Up @@ -86,6 +92,8 @@ module "jupyterhub" {
external-url = var.endpoint
realm_id = var.realm_id

overrides = var.jupyterhub-overrides

home-pvc = module.jupyterhub-nfs-mount.persistent_volume_claim.name

shared-pvc = module.jupyterhub-nfs-mount.persistent_volume_claim.name
Expand Down

0 comments on commit 49f32a8

Please sign in to comment.