From cdaad3b21a2b90954e50cba0572494759efc31f1 Mon Sep 17 00:00:00 2001 From: Pan Luo Date: Thu, 22 Feb 2024 17:28:22 -0800 Subject: [PATCH] Hard code PVC name as efs As we can't use variable in values.yaml --- .prettierignore | 2 +- jupyterhub/templates/_helpers-names.tpl | 5 +++++ jupyterhub/templates/examapi/deployment.yaml | 2 +- jupyterhub/templates/examapi/pv.yaml | 4 ++-- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.prettierignore b/.prettierignore index 9ad205279b..1018e3e530 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1 @@ -jupyterhub/templates/ +jupyterhub/templates/** diff --git a/jupyterhub/templates/_helpers-names.tpl b/jupyterhub/templates/_helpers-names.tpl index 1e92f72d77..232eced350 100644 --- a/jupyterhub/templates/_helpers-names.tpl +++ b/jupyterhub/templates/_helpers-names.tpl @@ -225,6 +225,11 @@ {{- include "jupyterhub.fullname.dash" . }}exam-api {{- end }} +{{- /* EFS name */}} +{{- define "jupyterhub.efs.fullname" -}} + {{- include "jupyterhub.fullname.dash" . }}efs +{{- end }} + {{- /* Cluster wide resources diff --git a/jupyterhub/templates/examapi/deployment.yaml b/jupyterhub/templates/examapi/deployment.yaml index 12958ee981..033a896e9a 100644 --- a/jupyterhub/templates/examapi/deployment.yaml +++ b/jupyterhub/templates/examapi/deployment.yaml @@ -80,5 +80,5 @@ spec: volumes: - name: jupyterhub-efs persistentVolumeClaim: - claimName: {{ include "jupyterhub.examapi.fullname" . }} + claimName: efs {{- end }} diff --git a/jupyterhub/templates/examapi/pv.yaml b/jupyterhub/templates/examapi/pv.yaml index 2e9e810374..41cf528135 100644 --- a/jupyterhub/templates/examapi/pv.yaml +++ b/jupyterhub/templates/examapi/pv.yaml @@ -2,7 +2,7 @@ apiVersion: v1 kind: PersistentVolume metadata: - name: {{ include "jupyterhub.examapi.fullname" . }} + name: {{ include "jupyterhub.efs.fullname" . }} spec: capacity: storage: 5Gi @@ -20,7 +20,7 @@ spec: apiVersion: v1 kind: PersistentVolumeClaim metadata: - name: {{ include "jupyterhub.examapi.fullname" . }} + name: efs spec: accessModes: - ReadWriteMany