Skip to content

Commit

Permalink
Revert "minor: remove static NFS PV (#100)" (#101)
Browse files Browse the repository at this point in the history
This reverts commit 9792689.
  • Loading branch information
ranchodeluxe authored Jul 9, 2024
1 parent 6e408d6 commit 5d25b36
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
19 changes: 19 additions & 0 deletions helm-chart/eoapi/templates/pv-static-efs-rwmany.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/master/examples/kubernetes/static_provisioning/README.md
{{- if and (.Values.postgresclusterNFSStaticPV.enabled) (.Values.postgrescluster.enabled) }}
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: efs-pv
spec:
capacity:
storage: 300Mi
volumeMode: Filesystem
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: {{ .Values.postgresclusterNFSStaticPV.storageClassName }}
csi:
driver: efs.csi.aws.com
volumeHandle: {{ .Values.postgresclusterNFSStaticPV.volumeHandle }}
{{- end }}
12 changes: 12 additions & 0 deletions helm-chart/eoapi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,18 @@ db:
PGPASSWORD: ""
PGDATABASE: "postgis"

# on AWS we use the EBS and EFS CSI drivers that dynamically create
# and mount storage on request via PVC(s) but for NFS
# the EFS CSI driver by default creates mounts with access points
# that restrict read/write permissions to the uid:gid of the mount.
# in simple cases we don't want to have to think about this extra layer for NFS
# and this is a workaround to mount a static NFS without access points.
# NOTE: GCP and other IaC haven't been set up to use NFS yet
postgresclusterNFSStaticPV:
enabled: false
storageClassName: ""
volumeHandle: ""

# this is declared as a dependency of eoapi in helm-chart/eoapi/Chart.yaml
postgrescluster:
enabled: true
Expand Down

0 comments on commit 5d25b36

Please sign in to comment.