rework postgres storage to single-replica best-effort
This commit is contained in:
parent
7dd21eefae
commit
b86e2a63cc
3 changed files with 42 additions and 21 deletions
|
|
@ -10,6 +10,36 @@ spec:
|
|||
volumeName: pvc-43c3a05b-5556-4d7c-83e3-ee6436f1a48e
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
storageClassName: longhorn-ssd
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: postgres-local-pvc
|
||||
namespace: darkdork-dev
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
storageClassName: longhorn-single-replica-best-effort
|
||||
resources:
|
||||
requests:
|
||||
storage: 15Gi
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistenVolumeClaim
|
||||
metadata:
|
||||
name: postgres-local-path-test-pvc
|
||||
namespace: darkdork-dev
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
accessModes: ["ReadWriteOnce"]
|
||||
storageClassName: local-path
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
|
|
@ -50,7 +50,7 @@ spec:
|
|||
- name: PGDATA
|
||||
value: /var/lib/postgresql/data/pgdata
|
||||
volumeMounts:
|
||||
- name: postgres-storage
|
||||
- name: postgres-local
|
||||
mountPath: /var/lib/postgresql/data
|
||||
subPath: pgdata # Using subPath to avoid permission issues
|
||||
- name: dshm
|
||||
|
|
@ -60,6 +60,8 @@ spec:
|
|||
- name: postgres-config-volume
|
||||
mountPath: /etc/postgresql/postgresql.conf
|
||||
subPath: postgresql.conf
|
||||
- name: postgres-local
|
||||
mountPath: /mnt
|
||||
command:
|
||||
- docker-entrypoint.sh
|
||||
- -c
|
||||
|
|
@ -114,4 +116,7 @@ spec:
|
|||
name: postgres-config
|
||||
- name: postgres-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: postgres-pvc
|
||||
claimName: postgres-pvc
|
||||
- name: postgres-local
|
||||
persistentVolumeClaim:
|
||||
claimName: postgres-local-pvc
|
||||
Loading…
Add table
Add a link
Reference in a new issue