This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/deploy/postgres/templates/postgres-deployment.yaml
2017-07-20 13:50:22 +02:00

46 lines
1.2 KiB
YAML

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: postgres
labels:
k8s-app: postgres
spec:
replicas: 1
selector:
matchLabels:
k8s-app: postgres
template:
metadata:
labels:
k8s-app: postgres
spec:
containers:
- image: {{image}}
name: postgres
env:
- name: POSTGRES_PASSWORD
value: "{{password}}"
- name: PGPASSWORD
value: "{{password}}"
- name: POSTGRES_USER
value: "{{user}}"
- name: POSTGRES_DB
value: "{{dbname}}"
- name: PGDATA
value: /var/lib/postgresql/data/pgdata
ports:
- containerPort: 5432
name: postgres
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
# livenessProbe:
# tcpSocket:
# port: "postgres"
# initialDelaySeconds: 5
# timeoutSeconds: 1
# readinessProbe:
# initialDelaySeconds: 600
# exec:
# command: ["psql", "-h", "localhost", "-U", "postgres"]
volumes: {{data_volumes}}