Skip to content

Commit

Permalink
Merge pull request #3468 from benz0li/subpath-on-dynamic-storage
Browse files Browse the repository at this point in the history
Add `singleuser.storage.dynamic.subPath` config
  • Loading branch information
consideRatio authored Jul 30, 2024
2 parents f1a6066 + 1e6f98f commit 21e929d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions jupyterhub/files/hub/jupyterhub_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ def camelCaseify(s):
{
"mountPath": get_config("singleuser.storage.homeMountPath"),
"name": volume_name_template,
"subPath": get_config("singleuser.storage.dynamic.subPath"),
}
]
elif storage_type == "static":
Expand Down
17 changes: 9 additions & 8 deletions jupyterhub/values.schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2373,6 +2373,14 @@ properties:
There is of a default StorageClass available in k8s clusters
for use if this is unspecified.
subPath: &subPath-spec
type: [string, "null"]
description: |
Configures the `subPath` field of a
`KubeSpawner.volume_mounts` entry added by the Helm chart.
Path within the volume from which the container's volume
should be mounted. Defaults to "" (volume's root).
volumeNameTemplate:
type: [string, "null"]
description: |
Expand Down Expand Up @@ -2402,14 +2410,7 @@ properties:
description: |
Configures `KubeSpawner.pvc_claim_name` to reference
pre-existing storage.
subPath:
type: [string, "null"]
description: |
Configures the `subPath` field of a
`KubeSpawner.volume_mounts` entry added by the Helm chart.
Path within the volume from which the container's volume
should be mounted.
subPath: *subPath-spec
type:
enum: [dynamic, static, none]
description: |
Expand Down
1 change: 1 addition & 0 deletions jupyterhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ singleuser:
pvcNameTemplate: claim-{username}{servername}
volumeNameTemplate: volume-{username}{servername}
storageAccessModes: [ReadWriteOnce]
subPath:
image:
name: quay.io/jupyterhub/k8s-singleuser-sample
tag: "set-by-chartpress"
Expand Down

0 comments on commit 21e929d

Please sign in to comment.