Some checks failed
Deploy to Production / Build and Deploy (push) Failing after 6m2s
74 lines
2.1 KiB
YAML
74 lines
2.1 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 }}"
|
|
- name: POSTGRES_HOST_AUTH_METHOD
|
|
value: "scram-sha-256"
|
|
startupProbe:
|
|
exec:
|
|
command:
|
|
- pg_isready
|
|
- -U
|
|
- "{{ .Values.postgres.user }}"
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 5
|
|
failureThreshold: 30
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- pg_isready
|
|
- -U
|
|
- "{{ .Values.postgres.user }}"
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 5
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- pg_isready
|
|
- -U
|
|
- "{{ .Values.postgres.user }}"
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
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
|