Skip to content

Commit

Permalink
feat: use dynamic volume provisioning for postgres pvc (#270)
Browse files Browse the repository at this point in the history
Use dynamic volume provisioning for the Postres PVC. We shouldn't
hardcode the storage class or the mount path. We should defer this to
the cluster configuration.


https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/#using-dynamic-provisioning
  • Loading branch information
rochecompaan authored Jul 8, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 3ae406d commit c9566fd
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions {{cookiecutter.project_slug}}/k8s/local/postgres.yaml
Original file line number Diff line number Diff line change
@@ -63,31 +63,14 @@ spec:
claimName: postgres-pvc
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: postgres-pv
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
hostPath:
path: /mnt/postgres-data
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres-pvc
labels:
type: local
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
volumeName: postgres-pv

0 comments on commit c9566fd

Please # to comment.