Skip to content

Commit 50b46bf

Browse files
committed
Explicitly mount the extraFiles volumes
1 parent 916fd39 commit 50b46bf

File tree

1 file changed

+50
-4
lines changed

1 file changed

+50
-4
lines changed

config/clusters/maap/staging.values.yaml

Lines changed: 50 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jupyterhub:
2222
- -c
2323
- >
2424
id &&
25-
chown 1000:1000 /home/jovyan /home/jovyan/shared /home/jovyan/shared-public /home/jovyan/shared-group &&
25+
chown 1000:1000 /home/jovyan /home/jovyan/shared /home/jovyan/shared-public &&
2626
if [ -d "/home/jovyan/shared-group" ] && [ "$(ls -A /home/jovyan/shared-group)" ]; then
2727
chown 1000:1000 /home/jovyan/shared-group/* || true;
2828
fi &&
@@ -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,22 +270,49 @@ 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
312+
01-group-GPU-T4-extra-volume-mounts:
313+
groups: ["GPU:T4"]
314+
spawner_override:
315+
volume_mounts:
270316
01-group-GPU-T4-extra-volume-mounts:
271317
name: home
272318
mountPath: /home/jovyan/shared-group/GPU_T4

0 commit comments

Comments
 (0)