@@ -14,25 +14,25 @@ jupyterhub:
1414 nodeSelector :
1515 2i2c/hub-name : staging
1616 initContainers :
17- - &volume_ownership_fix_initcontainer
18- name : volume-mount-ownership-fix
19- image : busybox:1.36.1
20- command :
21- - sh
22- - -c
23- - >
24- id &&
25- chown 1000:1000 /home/jovyan /home/jovyan/shared /home/jovyan/shared-public /home/jovyan/shared-group &&
26- if [ -d "/home/jovyan/shared-group" ] && [ "$(ls -A /home/jovyan/shared-group)" ]; then
27- chown 1000:1000 /home/jovyan/shared-group/* || true;
28- fi &&
29- ls -lhd /home/jovyan
30- securityContext :
31- runAsUser : 0
32- volumeMounts :
33- - name : home
34- mountPath : /home/jovyan
35- subPath : ' {escaped_username}'
17+ - &volume_ownership_fix_initcontainer
18+ name : volume-mount-ownership-fix
19+ image : busybox:1.36.1
20+ command :
21+ - sh
22+ - -c
23+ - >
24+ id &&
25+ chown 1000:1000 /home/jovyan /home/jovyan/shared /home/jovyan/shared-public &&
26+ if [ -d "/home/jovyan/shared-group" ] && [ "$(ls -A /home/jovyan/shared-group)" ]; then
27+ chown 1000:1000 /home/jovyan/shared-group/* || true;
28+ fi &&
29+ ls -lhd /home/jovyan
30+ securityContext :
31+ runAsUser : 0
32+ volumeMounts :
33+ - name : home
34+ mountPath : /home/jovyan
35+ subPath : " {escaped_username}"
3636 # Mounted without readonly attribute here,
3737 # so we can chown it appropriately
3838 - name : home
@@ -241,6 +241,25 @@ jupyterhub:
241241 name : dev-shm
242242 emptyDir :
243243 medium : Memory
244+ 02-extra-files :
245+ name : files
246+ secret :
247+ secretName : singleuser
248+ items :
249+ - key : ghsa-w3vc-fx9p-wp4v-check-patch-run
250+ mode : 493
251+ path : ghsa-w3vc-fx9p-wp4v-check-patch-run
252+ - key : ipython_kernel_config.json
253+ path : ipython_kernel_config.json
254+ - key : jupyter_notebook_config.json
255+ path : jupyter_notebook_config.json
256+ - key : jupyter_server_config.json
257+ path : jupyter_server_config.json
258+ 03-shared-group :
259+ name : shared-group-placeholder
260+ emptyDir :
261+ medium : Memory
262+ sizeLimit : 1Mi
244263 volume_mounts :
245264 00-home-nfs :
246265 name : home
@@ -251,27 +270,50 @@ jupyterhub:
251270 mountPath : /home/jovyan/shared
252271 subPath : _shared
253272 readOnly : true
254- 02-home-shared-public :
273+ 02-home-shared-group :
274+ # overrides the root of the shared-group folder with an empty dir
275+ # so that the user can't see the contents of other groups' folders
276+ # that the user is not a member of
277+ name : shared-group-placeholder
278+ mountPath : /home/jovyan/shared-group
279+ 03-home-shared-public :
255280 name : home
256281 mountPath : /home/jovyan/shared-public
257282 subPath : _shared-public
258- 03 -dev-shm :
283+ 04 -dev-shm :
259284 name : dev-shm
260285 mountPath : /dev/shm
286+ 05-mount-ghsa-patch :
287+ name : files
288+ mountPath : /mnt/ghsa-w3vc-fx9p-wp4v/check-patch-run
289+ subPath : ghsa-w3vc-fx9p-wp4v-check-patch-run
290+ 06-mount-ipython-config :
291+ name : files
292+ mountPath : /usr/local/etc/ipython/ipython_kernel_config.json
293+ subPath : ipython_kernel_config.json
294+ 07-mount-jupyter-notebook-config :
295+ name : files
296+ mountPath : /usr/local/etc/jupyter/jupyter_notebook_config.json
297+ subPath : jupyter_notebook_config.json
298+ 08-mount-jupyter-server-config :
299+ name : files
300+ mountPath : /usr/local/etc/jupyter/jupyter_server_config.json
301+ subPath : jupyter_server_config.json
261302 group_overrides :
303+ # Explicitly mount the shared group folders based on group membership
262304 00-group-CPU-L-extra-volume-mounts :
263305 groups : ["CPU:L"]
264306 spawner_override :
265307 volume_mounts :
266- 00-group-CPU-L-shared-dir :
308+ 00-group-CPU-L-extra-volume-mounts :
267309 name : home
268310 mountPath : /home/jovyan/shared-group/CPU_L
269311 subPath : _shared-group/CPU_L
270312 01-group-GPU-T4-extra-volume-mounts :
271313 groups : ["GPU:T4"]
272314 spawner_override :
273315 volume_mounts :
274- 00 -group-GPU-T4-shared-dir :
316+ 01 -group-GPU-T4-extra-volume-mounts :
275317 name : home
276318 mountPath : /home/jovyan/shared-group/GPU_T4
277319 subPath : _shared-group/GPU_T4
0 commit comments