43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: postgres
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: postgres
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: postgres
|
|
spec:
|
|
containers:
|
|
- name: postgres
|
|
image: {{ .Values.postgres.image }}
|
|
ports:
|
|
- containerPort: 5432
|
|
env:
|
|
- name: POSTGRES_DB
|
|
value: {{ .Values.postgres.dbName }}
|
|
- name: POSTGRES_USER
|
|
value: {{ .Values.postgres.user }}
|
|
- name: POSTGRES_PASSWORD
|
|
value: {{ .Values.postgres.password }}
|
|
volumeMounts:
|
|
- mountPath: /var/lib/postgresql/data
|
|
name: postgres-data
|
|
- mountPath: /etc/postgresql/pg_hba.conf
|
|
name: postgres-config
|
|
subPath: pg_hba.conf
|
|
- mountPath: /etc/postgresql/postgresql.conf
|
|
name: postgres-config
|
|
subPath: postgresql.conf
|
|
volumes:
|
|
- name: postgres-data
|
|
persistentVolumeClaim:
|
|
claimName: postgres-pvc-fresh
|
|
- name: postgres-config
|
|
configMap:
|
|
name: postgres-config
|