From 4ebbf51d0551b572c866ef45b36e85a3725efb8c Mon Sep 17 00:00:00 2001 From: Pan Luo Date: Thu, 29 Feb 2024 15:48:57 -0800 Subject: [PATCH] Eable creating PV and pass efsHandle to pv --- jupyterhub/templates/examapi/pv.yaml | 36 ++++++++++++++-------------- jupyterhub/values.yaml | 9 ++++--- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/jupyterhub/templates/examapi/pv.yaml b/jupyterhub/templates/examapi/pv.yaml index 5cb031e665..15bd1efbe2 100644 --- a/jupyterhub/templates/examapi/pv.yaml +++ b/jupyterhub/templates/examapi/pv.yaml @@ -1,31 +1,31 @@ -{{/*---*/}} -{{/*apiVersion: v1*/}} -{{/*kind: PersistentVolume*/}} -{{/*metadata:*/}} -{{/* name: {{ include "jupyterhub.efs.fullname" . }}*/}} -{{/*spec:*/}} -{{/* capacity:*/}} -{{/* storage: 5Gi*/}} -{{/* volumeMode: Filesystem*/}} -{{/* accessModes:*/}} -{{/* - ReadWriteMany*/}} -{{/* persistentVolumeReclaimPolicy: Retain*/}} -{{/* storageClassName: {{ .Values.examapi.storageClassName }}*/}} -{{/* csi:*/}} -{{/* driver: efs.csi.aws.com*/}} -{{/* volumeHandle: {{ .Values.examapi.efsHandle }}*/}} +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: {{ .Release.Name }}-home +spec: + capacity: + storage: 5Gi + volumeMode: Filesystem + accessModes: + - ReadWriteMany + persistentVolumeReclaimPolicy: Retain + storageClassName: "" + csi: + driver: efs.csi.aws.com + volumeHandle: {{ .Values.efs.handle }} --- apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: home + name: {{ .Release.Name }}-home spec: accessModes: - ReadWriteMany storageClassName: "" - volumeName: home + volumeName: {{ .Release.Name }}-home resources: requests: storage: 5Gi diff --git a/jupyterhub/values.yaml b/jupyterhub/values.yaml index dc7f84c4ac..7b48417957 100644 --- a/jupyterhub/values.yaml +++ b/jupyterhub/values.yaml @@ -690,11 +690,6 @@ examapi: dataSnap: # /mnt/efs/example-snap dataInternal: # /mnt/efs/example-internal apiKey: - # set to true if the StorageClass doesn't exist - # createStorageClass: false - # storageClassName: exam-api-sc - # EFS identifier in the format of "fs-xxxxxxxxxxxx" - # efsHandle: # persistent volume claim name, should use the same value as singleuser.storage.static.pvcName pvcName: service: @@ -707,6 +702,10 @@ examapi: # the DNS name for exam api. AWS load balance controller uses it for discover SSL cert. host: +efs: + # EFS identifier in the format of "fs-xxxxxxxxxxxx" + handle: + debug: enabled: false