73 lines
1.6 KiB
YAML
73 lines
1.6 KiB
YAML
|
|
***REMOVED***
|
||
|
|
***REMOVED***
|
||
|
|
***REMOVED***
|
||
|
|
name: postgres-secret
|
||
|
|
namespace: firefly
|
||
|
|
***REMOVED***
|
||
|
|
***REMOVED***
|
||
|
|
POSTGRES_DB: firefly
|
||
|
|
POSTGRES_USER: firefly
|
||
|
|
POSTGRES_PASSWORD: pm1njqt6ulc92231
|
||
|
|
---
|
||
|
|
apiVersion: apps/v1
|
||
|
|
kind: StatefulSet
|
||
|
|
***REMOVED***
|
||
|
|
name: postgres
|
||
|
|
namespace: firefly
|
||
|
|
spec:
|
||
|
|
serviceName: postgres
|
||
|
|
replicas: 1
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
app: postgres
|
||
|
|
template:
|
||
|
|
***REMOVED***
|
||
|
|
labels:
|
||
|
|
app: postgres
|
||
|
|
spec:
|
||
|
|
initContainers:
|
||
|
|
- name: init-postgres-dir
|
||
|
|
image: busybox
|
||
|
|
command:
|
||
|
|
- sh
|
||
|
|
- -c
|
||
|
|
- |
|
||
|
|
mkdir -p /var/lib/postgresql/data/pgdata && chown -R 999:999 /var/lib/postgresql/data
|
||
|
|
volumeMounts:
|
||
|
|
- name: postgres-data
|
||
|
|
mountPath: /var/lib/postgresql/data
|
||
|
|
containers:
|
||
|
|
- name: postgres
|
||
|
|
image: postgres:15
|
||
|
|
envFrom:
|
||
|
|
- secretRef:
|
||
|
|
name: postgres-secret
|
||
|
|
env:
|
||
|
|
- name: PGDATA
|
||
|
|
value: /var/lib/postgresql/data/pgdata
|
||
|
|
ports:
|
||
|
|
- containerPort: 5432
|
||
|
|
volumeMounts:
|
||
|
|
- name: postgres-data
|
||
|
|
mountPath: /var/lib/postgresql/data
|
||
|
|
volumeClaimTemplates:
|
||
|
|
- ***REMOVED***
|
||
|
|
name: postgres-data
|
||
|
|
spec:
|
||
|
|
accessModes: ["ReadWriteOnce"]
|
||
|
|
storageClassName: ceph-rbd
|
||
|
|
resources:
|
||
|
|
requests:
|
||
|
|
storage: 10Gi
|
||
|
|
---
|
||
|
|
***REMOVED***
|
||
|
|
kind: Service
|
||
|
|
***REMOVED***
|
||
|
|
name: postgres
|
||
|
|
namespace: firefly
|
||
|
|
spec:
|
||
|
|
ports:
|
||
|
|
- port: 5432
|
||
|
|
selector:
|
||
|
|
app: postgres
|