Skip to content

Commit

Permalink
Merge pull request #2954 from consideRatio/pr/fix-shared-readwrite-stuff
Browse files Browse the repository at this point in the history
basehub: avoid creating empty shared-readwrite directory for non-admins
  • Loading branch information
consideRatio authored Aug 10, 2023
2 parents 99694c6 + 6f0a457 commit 51eee06
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions config/clusters/2i2c-aws-us/itcoocean.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jupyterhub:
[
"sh",
"-c",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared-readwrite && chown 1000:1000 /home/jovyan/shared-public && ls -lhd /home/jovyan ",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared && chown 1000:1000 /home/jovyan/shared-public && ls -lhd /home/jovyan ",
]
securityContext:
runAsUser: 0
Expand All @@ -83,7 +83,7 @@ jupyterhub:
# Mounted without readonly attribute here,
# so we can chown it appropriately
- name: home
mountPath: /home/jovyan/shared-readwrite
mountPath: /home/jovyan/shared
subPath: _shared
- name: home
mountPath: /home/jovyan/shared-public
Expand Down
4 changes: 2 additions & 2 deletions config/clusters/2i2c/climatematch.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jupyterhub:
[
"sh",
"-c",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared-readwrite && chown 1000:1000 /home/jovyan/shared-public && ls -lhd /home/jovyan ",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared && chown 1000:1000 /home/jovyan/shared-public && ls -lhd /home/jovyan ",
]
securityContext:
runAsUser: 0
Expand All @@ -53,7 +53,7 @@ jupyterhub:
# Mounted without readonly attribute here,
# so we can chown it appropriately
- name: home
mountPath: /home/jovyan/shared-readwrite
mountPath: /home/jovyan/shared
subPath: _shared
- name: home
mountPath: /home/jovyan/shared-public
Expand Down
4 changes: 2 additions & 2 deletions config/clusters/nasa-cryo/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ basehub:
[
"sh",
"-c",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared-readwrite && chown 1000:1000 /home/jovyan/shared-public && ls -lhd /home/jovyan ",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared && chown 1000:1000 /home/jovyan/shared-public && ls -lhd /home/jovyan ",
]
securityContext:
runAsUser: 0
Expand All @@ -105,7 +105,7 @@ basehub:
# Mounted without readonly attribute here,
# so we can chown it appropriately
- name: home
mountPath: /home/jovyan/shared-readwrite
mountPath: /home/jovyan/shared
subPath: _shared
- name: home
mountPath: /home/jovyan/shared-public
Expand Down
4 changes: 2 additions & 2 deletions config/clusters/qcl/common.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ jupyterhub:
[
"sh",
"-c",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared-readwrite && chown 1000:1000 /home/jovyan/shared-public && ls -lhd /home/jovyan ",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared && chown 1000:1000 /home/jovyan/shared-public && ls -lhd /home/jovyan ",
]
securityContext:
runAsUser: 0
Expand All @@ -245,7 +245,7 @@ jupyterhub:
# Mounted without readonly attribute here,
# so we can chown it appropriately
- name: home
mountPath: /home/jovyan/shared-readwrite
mountPath: /home/jovyan/shared
subPath: _shared
- name: home
mountPath: /home/jovyan/shared-public
Expand Down
7 changes: 4 additions & 3 deletions docs/howto/features/per-user-db.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,18 @@ jupyterhub:
[
"sh",
"-c",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared-readwrite && chown 1000:1000 /var/lib/postgresql/data && ls -lhd /home/jovyan ",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared && chown 1000:1000 /var/lib/postgresql/data && ls -lhd /home/jovyan ",
]
securityContext:
runAsUser: 0
volumeMounts:
- name: home
mountPath: /home/jovyan
subPath: "{username}"
# Here so we can chown it appropriately
# Mounted without readonly attribute here,
# so we can chown it appropriately
- name: home
mountPath: /home/jovyan/shared-readwrite
mountPath: /home/jovyan/shared
subPath: _shared
- name: postgres-db
mountPath: /var/lib/postgresql/data
Expand Down
4 changes: 2 additions & 2 deletions docs/topic/infrastructure/storage-layer.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jupyterhub:
[
"sh",
"-c",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared-readwrite && chown 1000:1000 /home/jovyan/shared-public && ls -lhd /home/jovyan ",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared && chown 1000:1000 /home/jovyan/shared-public && ls -lhd /home/jovyan ",
]
securityContext:
runAsUser: 0
Expand All @@ -128,7 +128,7 @@ jupyterhub:
# Mounted without readonly attribute here,
# so we can chown it appropriately
- name: home
mountPath: /home/jovyan/shared-readwrite
mountPath: /home/jovyan/shared
subPath: _shared
- name: home
mountPath: /home/jovyan/shared-public
Expand Down
7 changes: 4 additions & 3 deletions helm-charts/basehub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,18 @@ jupyterhub:
[
"sh",
"-c",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared-readwrite && ls -lhd /home/jovyan ",
"id && chown 1000:1000 /home/jovyan && chown 1000:1000 /home/jovyan/shared && ls -lhd /home/jovyan ",
]
securityContext:
runAsUser: 0
volumeMounts:
- name: home
mountPath: /home/jovyan
subPath: "{username}"
# Here so we can chown it appropriately
# Mounted without readonly attribute here,
# so we can chown it appropriately
- name: home
mountPath: /home/jovyan/shared-readwrite
mountPath: /home/jovyan/shared
subPath: _shared
cmd:
# Explicitly define this, as it's no longer set by z2jh
Expand Down

0 comments on commit 51eee06

Please sign in to comment.