Skip to content

Commit 21e929d

Browse files
authored
Merge pull request #3468 from benz0li/subpath-on-dynamic-storage
Add `singleuser.storage.dynamic.subPath` config
2 parents f1a6066 + 1e6f98f commit 21e929d

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

jupyterhub/files/hub/jupyterhub_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ def camelCaseify(s):
282282
{
283283
"mountPath": get_config("singleuser.storage.homeMountPath"),
284284
"name": volume_name_template,
285+
"subPath": get_config("singleuser.storage.dynamic.subPath"),
285286
}
286287
]
287288
elif storage_type == "static":

jupyterhub/values.schema.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2373,6 +2373,14 @@ properties:
23732373
23742374
There is of a default StorageClass available in k8s clusters
23752375
for use if this is unspecified.
2376+
subPath: &subPath-spec
2377+
type: [string, "null"]
2378+
description: |
2379+
Configures the `subPath` field of a
2380+
`KubeSpawner.volume_mounts` entry added by the Helm chart.
2381+
2382+
Path within the volume from which the container's volume
2383+
should be mounted. Defaults to "" (volume's root).
23762384
volumeNameTemplate:
23772385
type: [string, "null"]
23782386
description: |
@@ -2402,14 +2410,7 @@ properties:
24022410
description: |
24032411
Configures `KubeSpawner.pvc_claim_name` to reference
24042412
pre-existing storage.
2405-
subPath:
2406-
type: [string, "null"]
2407-
description: |
2408-
Configures the `subPath` field of a
2409-
`KubeSpawner.volume_mounts` entry added by the Helm chart.
2410-
2411-
Path within the volume from which the container's volume
2412-
should be mounted.
2413+
subPath: *subPath-spec
24132414
type:
24142415
enum: [dynamic, static, none]
24152416
description: |

jupyterhub/values.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ singleuser:
395395
pvcNameTemplate: claim-{username}{servername}
396396
volumeNameTemplate: volume-{username}{servername}
397397
storageAccessModes: [ReadWriteOnce]
398+
subPath:
398399
image:
399400
name: quay.io/jupyterhub/k8s-singleuser-sample
400401
tag: "set-by-chartpress"

0 commit comments

Comments
 (0)