From 08fccd053b57806a5774d6d56fe8bd66b37a397d Mon Sep 17 00:00:00 2001 From: Simple_Not <44047940+moonbaseDelta@users.noreply.github.com> Date: Thu, 14 Dec 2023 19:36:07 +1000 Subject: [PATCH] add pg --- .../02-deployments/deployment-postgres.yaml | 89 ++++++++----------- 1 file changed, 37 insertions(+), 52 deletions(-) diff --git a/manifests/02-deployments/deployment-postgres.yaml b/manifests/02-deployments/deployment-postgres.yaml index eee82dd..8f1168b 100644 --- a/manifests/02-deployments/deployment-postgres.yaml +++ b/manifests/02-deployments/deployment-postgres.yaml @@ -33,55 +33,40 @@ spec: configMapKeyRef: name: postgres-configmap key: postgres-dbname - volumeMounts: - - mountPath: /var/lib/postgresql/data - name: postgredb - volumes: - - name: postgredb - persistentVolumeClaim: - claimName: postgres-pv-claim - --- - kind: PersistentVolume - apiVersion: v1 - metadata: - name: postgres-pv-volume - labels: - type: local - app: postgres - spec: - storageClassName: manual - capacity: - storage: 5Gi - accessModes: - - ReadWriteMany - hostPath: - path: "/mnt/data" - --- - kind: PersistentVolumeClaim - apiVersion: v1 - metadata: - name: postgres-pv-claim - labels: - app: postgres - spec: - storageClassName: manual - accessModes: - - ReadWriteMany - resources: - requests: - storage: 5Gi - --- - apiVersion: v1 - kind: Service - metadata: - name: postgres - labels: - app: postgres - spec: - ports: - - name: postgres - port: 5432 - nodePort: 30432 - type: NodePort - selector: - app: postgres \ No newline at end of file + volumeMounts: + - mountPath: /var/lib/postgresql/data + name: postgredb + volumes: + - name: postgredb + persistentVolumeClaim: + claimName: postgres-pv-claim +--- +kind: PersistentVolume +apiVersion: v1 +metadata: + name: postgres-pv-volume + labels: + type: local + app: postgres +spec: + storageClassName: manual + capacity: + storage: 5Gi + accessModes: + - ReadWriteMany + hostPath: + path: "/mnt/data" +--- +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: postgres-pv-claim + labels: + app: postgres +spec: + storageClassName: manual + accessModes: + - ReadWriteMany + resources: + requests: + storage: 5Gi \ No newline at end of file