50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: postgres-hetzner
|
|
namespace: database
|
|
spec:
|
|
replicas: 1
|
|
strategy:
|
|
type: Recreate
|
|
selector:
|
|
matchLabels:
|
|
app: postgres-hetzner
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: postgres-hetzner
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: registry-creds
|
|
containers:
|
|
- name: postgres
|
|
image: rg.mariushome.lt/custom-postgres
|
|
imagePullPolicy: Always
|
|
args:
|
|
- -c
|
|
- config_file=/etc/postgresql/postgresql.conf
|
|
volumeMounts:
|
|
- name: postgres-data
|
|
mountPath: /var/lib/postgresql
|
|
- name: postgres-config
|
|
mountPath: /etc/postgresql
|
|
readOnly: true
|
|
env:
|
|
- name: POSTGRES_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-secret
|
|
key: POSTGRES_PASSWORD
|
|
- name: POSTGRES_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: postgres-secret
|
|
key: POSTGRES_USER
|
|
volumes:
|
|
- name: postgres-data
|
|
persistentVolumeClaim:
|
|
claimName: postgres-hetzner-pvc
|
|
- name: postgres-config
|
|
configMap:
|
|
name: postgres-hetzner-config |