From 2a4540c2765d8edd7f9a0a932699a16365356b27 Mon Sep 17 00:00:00 2001 From: Andrew Sy Kim Date: Thu, 28 Mar 2024 01:44:19 -0400 Subject: [PATCH] JupyterHub should use a GCS bucket it can access when using GCSFuse (#434) JupyterHub should use a GCS bucket it can access when configuring GCSFuse for notebook servers Signed-off-by: Andrew Sy Kim --- .../config-selfauth-autopilot.yaml | 16 ++++++++-------- .../jupyter/jupyter_config/config-selfauth.yaml | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/modules/jupyter/jupyter_config/config-selfauth-autopilot.yaml b/modules/jupyter/jupyter_config/config-selfauth-autopilot.yaml index 87ebd999e..39db61330 100644 --- a/modules/jupyter/jupyter_config/config-selfauth-autopilot.yaml +++ b/modules/jupyter/jupyter_config/config-selfauth-autopilot.yaml @@ -136,8 +136,8 @@ singleuser: csi: driver: gcsfuse.csi.storage.gke.io volumeAttributes: - bucketName: gcsfuse-{username} - mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777" + bucketName: ${gcs_bucket} + mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777,only-dir=notebooks/{username}" kubespawner_override: node_selector: cloud.google.com/compute-class: "Performance" @@ -165,8 +165,8 @@ singleuser: csi: driver: gcsfuse.csi.storage.gke.io volumeAttributes: - bucketName: gcsfuse-{username} - mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777" + bucketName: ${gcs_bucket} + mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777,only-dir=notebooks/{username}" kubespawner_override: image: ${notebook_image}:${notebook_image_tag} extra_resource_limits: @@ -196,8 +196,8 @@ singleuser: csi: driver: gcsfuse.csi.storage.gke.io volumeAttributes: - bucketName: gcsfuse-{username} - mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777" + bucketName: ${gcs_bucket} + mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777,only-dir=notebooks/{username}" kubespawner_override: image: ${notebook_image}:${notebook_image_tag} extra_resource_limits: @@ -229,8 +229,8 @@ singleuser: csi: driver: gcsfuse.csi.storage.gke.io volumeAttributes: - bucketName: gcsfuse-{username} - mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777" + bucketName: ${gcs_bucket} + mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777,only-dir=notebooks/{username}" kubespawner_override: image: ${notebook_image}:${notebook_image_tag} extra_resource_limits: diff --git a/modules/jupyter/jupyter_config/config-selfauth.yaml b/modules/jupyter/jupyter_config/config-selfauth.yaml index 9f5345944..8010c3403 100644 --- a/modules/jupyter/jupyter_config/config-selfauth.yaml +++ b/modules/jupyter/jupyter_config/config-selfauth.yaml @@ -152,8 +152,8 @@ singleuser: csi: driver: gcsfuse.csi.storage.gke.io volumeAttributes: - bucketName: gcsfuse-{username} - mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777" + bucketName: ${gcs_bucket} + mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777,only-dir=notebooks/{username}" default: true - display_name: "TPU" description: "Creates TPUs VMs as the compute for notebook execution. Will only work if TPU is enabled." @@ -176,8 +176,8 @@ singleuser: csi: driver: gcsfuse.csi.storage.gke.io volumeAttributes: - bucketName: gcsfuse-{username} - mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777" + bucketName: ${gcs_bucket} + mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777,only-dir=notebooks/{username}" kubespawner_override: image: jupyter/tensorflow-notebook:python-3.10 extra_resource_limits: @@ -206,8 +206,8 @@ singleuser: csi: driver: gcsfuse.csi.storage.gke.io volumeAttributes: - bucketName: gcsfuse-{username} - mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777" + bucketName: ${gcs_bucket} + mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777,only-dir=notebooks/{username}" kubespawner_override: image: ${notebook_image}:${notebook_image_tag} extra_resource_limits: @@ -237,8 +237,8 @@ singleuser: csi: driver: gcsfuse.csi.storage.gke.io volumeAttributes: - bucketName: gcsfuse-{username} - mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777" + bucketName: ${gcs_bucket} + mountOptions: "uid=1000,gid=100,o=noexec,implicit-dirs,dir-mode=777,file-mode=777,only-dir=notebooks/{username}" kubespawner_override: image: ${notebook_image}:${notebook_image_tag} extra_resource_limits: