From 391d50e48ccfa2d36692b94e20c5820ac845fac4 Mon Sep 17 00:00:00 2001 From: JJGadgets Date: Sat, 4 Nov 2023 04:27:02 +0800 Subject: [PATCH] fix(crunchy): actually add nfs --- .../db/pg/clusters/template/kustomization.yaml | 1 + kube/deploy/core/db/pg/clusters/template/nfs.yaml | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 kube/deploy/core/db/pg/clusters/template/nfs.yaml diff --git a/kube/deploy/core/db/pg/clusters/template/kustomization.yaml b/kube/deploy/core/db/pg/clusters/template/kustomization.yaml index cbe447cc..54a383bf 100644 --- a/kube/deploy/core/db/pg/clusters/template/kustomization.yaml +++ b/kube/deploy/core/db/pg/clusters/template/kustomization.yaml @@ -3,6 +3,7 @@ kind: Kustomization resources: - secret-superuser.yaml - s3.yaml +- nfs.yaml - netpol.yaml - crunchy.yaml # - cluster.yaml diff --git a/kube/deploy/core/db/pg/clusters/template/nfs.yaml b/kube/deploy/core/db/pg/clusters/template/nfs.yaml new file mode 100644 index 00000000..999de177 --- /dev/null +++ b/kube/deploy/core/db/pg/clusters/template/nfs.yaml @@ -0,0 +1,15 @@ +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: "pg-${PG_APP_NAME}-wal-nfs" +spec: + storageClassName: "pg-${PG_APP_NAME}-wal-nfs" + capacity: + storage: 1Mi + accessModes: [ReadWriteMany] + persistentVolumeReclaimPolicy: Retain + nfs: + server: "${IP_TRUENAS}" + path: "${PATH_NAS_BACKUPS_PGBACKREST}/${PG_APP_NAME}" + mountOptions: ["nfsvers=4.0", "tcp", "hard", "noatime", "nodiratime", "nocto"] \ No newline at end of file