diff --git a/images/hub/jupyterhub_config.py b/images/hub/jupyterhub_config.py index f9cae389c4..d70ea97981 100644 --- a/images/hub/jupyterhub_config.py +++ b/images/hub/jupyterhub_config.py @@ -65,6 +65,7 @@ ('node_selector', 'node-selector'), ): set_config_if_not_none(c.KubeSpawner, trait, 'singleuser.' + cfg_key) +c.KubeSpawner.storage_extra_labels = get_config('singleuser.storage-extra-labels', {}) c.KubeSpawner.image_spec = get_config('singleuser.image-spec') # Configure dynamically provisioning pvc diff --git a/jupyterhub/templates/hub/configmap.yaml b/jupyterhub/templates/hub/configmap.yaml index 3f8bd1eaa2..a51e4ae6be 100644 --- a/jupyterhub/templates/hub/configmap.yaml +++ b/jupyterhub/templates/hub/configmap.yaml @@ -208,6 +208,12 @@ data: {{- range $key, $value := .Values.singleuser.extraLabels }} {{ $key | quote }}: {{ $value | quote }} {{- end }} + {{- if .Values.singleuser.storage.extraLabels }} + singleuser.storage-extra-labels: | + {{- range $key, $value := .Values.singleuser.storage.extraLabels }} + {{ $key | quote }}: {{ $value | quote }} + {{- end }} + {{- end }} {{- if .Values.singleuser.extraEnv }} singleuser.extra-env: | {{- range $key, $value := .Values.singleuser.extraEnv }} diff --git a/jupyterhub/values.yaml b/jupyterhub/values.yaml index eec2bfac2b..ce4c58e752 100644 --- a/jupyterhub/values.yaml +++ b/jupyterhub/values.yaml @@ -171,6 +171,7 @@ singleuser: serviceAccountName: storage: type: dynamic + extraLabels: {} extraVolumes: [] extraVolumeMounts: [] static: diff --git a/tools/templates/lint-and-validate-values.yaml b/tools/templates/lint-and-validate-values.yaml index 8552b90502..9eea1310d5 100644 --- a/tools/templates/lint-and-validate-values.yaml +++ b/tools/templates/lint-and-validate-values.yaml @@ -172,7 +172,6 @@ singleuser: - 169.254.169.254/32 events: true extraLabels: {} - storageExtraLabels: {} extraEnv: {} lifecycleHooks: initContainers: @@ -188,6 +187,8 @@ singleuser: serviceAccountName: storage: type: dynamic + extraLabels: + mock-label: mock-value extraVolumes: [] extraVolumeMounts: [] static: