add pg
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Simple_Not 2023-12-14 19:36:07 +10:00
parent d60c27c19f
commit 08fccd053b

View File

@ -33,55 +33,40 @@ spec:
configMapKeyRef: configMapKeyRef:
name: postgres-configmap name: postgres-configmap
key: postgres-dbname key: postgres-dbname
volumeMounts: volumeMounts:
- mountPath: /var/lib/postgresql/data - mountPath: /var/lib/postgresql/data
name: postgredb name: postgredb
volumes: volumes:
- name: postgredb - name: postgredb
persistentVolumeClaim: persistentVolumeClaim:
claimName: postgres-pv-claim claimName: postgres-pv-claim
--- ---
kind: PersistentVolume kind: PersistentVolume
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: postgres-pv-volume name: postgres-pv-volume
labels: labels:
type: local type: local
app: postgres app: postgres
spec: spec:
storageClassName: manual storageClassName: manual
capacity: capacity:
storage: 5Gi storage: 5Gi
accessModes: accessModes:
- ReadWriteMany - ReadWriteMany
hostPath: hostPath:
path: "/mnt/data" path: "/mnt/data"
--- ---
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: postgres-pv-claim name: postgres-pv-claim
labels: labels:
app: postgres app: postgres
spec: spec:
storageClassName: manual storageClassName: manual
accessModes: accessModes:
- ReadWriteMany - ReadWriteMany
resources: resources:
requests: requests:
storage: 5Gi 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