Skip to content

Commit

Permalink
Switch to static PVs
Browse files Browse the repository at this point in the history
  • Loading branch information
MuhamedAyoub committed Apr 27, 2024
1 parent 0c32dd3 commit f0ee895
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 5 deletions.
10 changes: 8 additions & 2 deletions material.dev.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,18 @@ secrets:
pvc:
enabled: true
name: material-pvc
storageClassName: madaurus-sc
volumeName: material-pvc
volumeName: material-pv
accessModes: ReadWriteOnce
storage: 25Gi
storageLimit: 30Gi


pv:
enabled: true
name: material-pv
storage: 30Gi
mode: ReadWriteOnce
hostPath: /data/material

container:
name: material
Expand Down
9 changes: 7 additions & 2 deletions staff.dev.values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,17 @@ affinity: {}
pvc:
enabled: true
name: staff-pvc
storageClassName: madaurus-sc
volumeName: staff-pv
accessModes: ReadWriteOnce
storage: 10Gi
storageLimit: 15Gi


pv:
enabled: true
name: staff-pv
storage: 10Gi
mode: ReadWriteOnce
hostPath: /data/staff
#! local database

localDatabase:
Expand Down
13 changes: 13 additions & 0 deletions templates/pv.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: {{ .Values.pv.name }}
spec:
storageClassName: ""
capacity:
storage: {{ .Values.pv.storage }} # Specify storage capacity
accessModes:
- ReadWriteOnce
hostPath:
path: {{ .Values.pv.hostPath }} # Specify the path on the host
type: Directory # Set type to Directory
3 changes: 2 additions & 1 deletion templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ metadata:
namespace: madaurus
name: {{ .Values.pvc.name }}
spec:
storageClassName: madaurus-sc # Constant value for now
volumeName: {{ .Values.pvc.volumeName }}
accessModes:
- {{ .Values.pvc.accessModes }}
resources:
requests:
storage: {{ .Values.pvc.storage }}
limits:
storage: {{ .Values.pvc.storageLimit }}

{{- end }}

0 comments on commit f0ee895

Please sign in to comment.