Skip to content

Commit

Permalink
Adjust PV/PVC for course cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
xcompass committed Feb 29, 2024
1 parent cdaad3b commit 539f622
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
jupyterhub/templates/**
jupyterhub/templates/
2 changes: 1 addition & 1 deletion jupyterhub/templates/examapi/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,5 @@ spec:
volumes:
- name: jupyterhub-efs
persistentVolumeClaim:
claimName: efs
claimName: home
{{- end }}
53 changes: 27 additions & 26 deletions jupyterhub/templates/examapi/pv.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
---
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: {{ 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: PersistentVolumeClaim
metadata:
name: efs
name: home
spec:
accessModes:
- ReadWriteMany
storageClassName: {{ .Values.examapi.storageClassName }}
storageClassName: ""
volumeName: home
resources:
requests:
storage: 5Gi

{{- if .Values.examapi.createStorageClass }}
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: {{ .Values.examapi.storageClassName }}
provisioner: efs.csi.aws.com
{{- end }}
{{/*{{- if .Values.examapi.createStorageClass }}*/}}
{{/*---*/}}
{{/*kind: StorageClass*/}}
{{/*apiVersion: storage.k8s.io/v1*/}}
{{/*metadata:*/}}
{{/* name: {{ .Values.examapi.storageClassName }}*/}}
{{/*provisioner: efs.csi.aws.com*/}}
{{/*{{- end }}*/}}
8 changes: 5 additions & 3 deletions jupyterhub/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -691,10 +691,12 @@ examapi:
dataInternal: # /mnt/efs/example-internal
apiKey:
# set to true if the StorageClass doesn't exist
createStorageClass: false
storageClassName: exam-api-sc
# createStorageClass: false
# storageClassName: exam-api-sc
# EFS identifier in the format of "fs-xxxxxxxxxxxx"
efsHandle:
# efsHandle:
# persistent volume claim name, should use the same value as singleuser.storage.static.pvcName
pvcName:
service:
type: NodePort
annotations: {}
Expand Down

0 comments on commit 539f622

Please sign in to comment.