Skip to content

Commit a2120fa

Browse files
Merge pull request #6206 from GeorgianaElena/patch-16
[nmfs-openscapes] add shared-public directory for staging and prod
2 parents 95df560 + a429519 commit a2120fa

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

config/clusters/nmfs-openscapes/prod.values.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,38 @@ jupyterhub:
3030
extraEnv:
3131
SCRATCH_BUCKET: s3://nmfs-openscapes-scratch/$(JUPYTERHUB_USER)
3232
PERSISTENT_BUCKET: s3://nmfs-openscapes-persistent/$(JUPYTERHUB_USER)
33+
storage:
34+
extraVolumeMounts:
35+
# A shared folder readable & writeable by everyone
36+
- name: home
37+
mountPath: /home/jovyan/shared-public
38+
subPath: _shared-public
39+
readOnly: false
40+
- name: home
41+
mountPath: /home/jovyan/shared
42+
subPath: _shared
43+
readOnly: true
44+
initContainers:
45+
- name: volume-mount-ownership-fix
46+
image: busybox:1.36.1
47+
command:
48+
- sh
49+
- -c
50+
- id && chown 1000:1000 /home/jovyan /home/jovyan/shared /home/jovyan/shared-public && ls -lhd /home/jovyan
51+
securityContext:
52+
runAsUser: 0
53+
volumeMounts:
54+
- name: home
55+
mountPath: /home/jovyan
56+
subPath: '{escaped_username}'
57+
# Mounted without readonly attribute here,
58+
# so we can chown it appropriately
59+
- name: home
60+
mountPath: /home/jovyan/shared
61+
subPath: _shared
62+
- name: home
63+
mountPath: /home/jovyan/shared-public
64+
subPath: _shared-public
3365
hub:
3466
config:
3567
JupyterHub:

config/clusters/nmfs-openscapes/staging.values.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,38 @@ jupyterhub:
3030
extraEnv:
3131
SCRATCH_BUCKET: s3://nmfs-openscapes-scratch-staging/$(JUPYTERHUB_USER)
3232
PERSISTENT_BUCKET: s3://nmfs-openscapes-persistent-staging/$(JUPYTERHUB_USER)
33+
storage:
34+
extraVolumeMounts:
35+
# A shared folder readable & writeable by everyone
36+
- name: home
37+
mountPath: /home/jovyan/shared-public
38+
subPath: _shared-public
39+
readOnly: false
40+
- name: home
41+
mountPath: /home/jovyan/shared
42+
subPath: _shared
43+
readOnly: true
44+
initContainers:
45+
- name: volume-mount-ownership-fix
46+
image: busybox:1.36.1
47+
command:
48+
- sh
49+
- -c
50+
- id && chown 1000:1000 /home/jovyan /home/jovyan/shared /home/jovyan/shared-public && ls -lhd /home/jovyan
51+
securityContext:
52+
runAsUser: 0
53+
volumeMounts:
54+
- name: home
55+
mountPath: /home/jovyan
56+
subPath: '{escaped_username}'
57+
# Mounted without readonly attribute here,
58+
# so we can chown it appropriately
59+
- name: home
60+
mountPath: /home/jovyan/shared
61+
subPath: _shared
62+
- name: home
63+
mountPath: /home/jovyan/shared-public
64+
subPath: _shared-public
3365
hub:
3466
config:
3567
JupyterHub:

0 commit comments

Comments
 (0)