From 384359ae855d8a4591be93af814abb1970381656 Mon Sep 17 00:00:00 2001 From: ranchodeluxe Date: Mon, 8 Jul 2024 05:34:44 -0700 Subject: [PATCH 1/2] changes --- helm-chart/eoapi/templates/db/pvc.yaml | 4 +++- .../eoapi/templates/pv-static-efs-rwmany.yaml | 19 +++++++++++++++++++ helm-chart/eoapi/values.yaml | 13 ++++++++++++- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 helm-chart/eoapi/templates/pv-static-efs-rwmany.yaml diff --git a/helm-chart/eoapi/templates/db/pvc.yaml b/helm-chart/eoapi/templates/db/pvc.yaml index aaf14091..69e1ed4f 100644 --- a/helm-chart/eoapi/templates/db/pvc.yaml +++ b/helm-chart/eoapi/templates/db/pvc.yaml @@ -1,3 +1,4 @@ +{{- if .Values.db.enabled }} --- apiVersion: v1 kind: PersistentVolumeClaim @@ -11,4 +12,5 @@ spec: {{- end }} resources: requests: - storage: {{ .Values.db.settings.resources.requests.storage }} \ No newline at end of file + storage: {{ .Values.db.settings.resources.requests.storage }} +{{- end }} \ No newline at end of file diff --git a/helm-chart/eoapi/templates/pv-static-efs-rwmany.yaml b/helm-chart/eoapi/templates/pv-static-efs-rwmany.yaml new file mode 100644 index 00000000..07319fb1 --- /dev/null +++ b/helm-chart/eoapi/templates/pv-static-efs-rwmany.yaml @@ -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 }} \ No newline at end of file diff --git a/helm-chart/eoapi/values.yaml b/helm-chart/eoapi/values.yaml index fa9e7155..740383d6 100644 --- a/helm-chart/eoapi/values.yaml +++ b/helm-chart/eoapi/values.yaml @@ -98,6 +98,17 @@ 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: @@ -106,7 +117,7 @@ postgrescluster: postGISVersion: 3.4 pgBouncerReplicas: 1 monitoring: false - backupsSize: 20Gi + instances: - name: eoapi replicas: 1 From 54b835f4cdd83d4c80c5470397b584207e314a59 Mon Sep 17 00:00:00 2001 From: ranchodeluxe Date: Tue, 9 Jul 2024 07:01:01 -0700 Subject: [PATCH 2/2] bump chart --- helm-chart/eoapi/CHANGELOG.md | 4 ++++ helm-chart/eoapi/Chart.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/helm-chart/eoapi/CHANGELOG.md b/helm-chart/eoapi/CHANGELOG.md index da3c941a..03e8e537 100644 --- a/helm-chart/eoapi/CHANGELOG.md +++ b/helm-chart/eoapi/CHANGELOG.md @@ -1,5 +1,9 @@ version numbers below correspond to helm chart `appVersion`: see `./helm-chart/eoapi/Chart.yaml` --- +### 0.3.5 (2024-07-09) + +* tweaks for getting NFS working with a static NFS EFS mount + ### 0.3.4 (2024-07-05) * add back in a hidden non-pgo option for EOEPCA+ diff --git a/helm-chart/eoapi/Chart.yaml b/helm-chart/eoapi/Chart.yaml index 89e119af..9e555646 100644 --- a/helm-chart/eoapi/Chart.yaml +++ b/helm-chart/eoapi/Chart.yaml @@ -17,13 +17,13 @@ kubeVersion: ">=1.23.0-0" # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: "0.3.2" +version: "0.3.3" # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "0.3.4" +appVersion: "0.3.5" dependencies: - name: postgrescluster