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/k8s/postgres-deployment.yaml
2019-11-12 11:09:47 -05:00

38 lines
No EOL
1.1 KiB
YAML

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: postgres
namespace: quay-enterprise
spec:
# Only one instance of the postgres database is defined here. Adjust replicas based on demand.
replicas: 1
template:
metadata:
labels:
app: postgres
spec:
containers:
- name: postgres
image: registry.access.redhat.com/rhscl/postgresql-10-rhel7:1-35
imagePullPolicy: "IfNotPresent"
ports:
- containerPort: 5432
env:
- name: POSTGRESQL_USER
# Replace "username" with a name for your Postgres user
value: "username"
- name: POSTGRESQL_DATABASE
# Replace "password" with a password for your Postgres user
value: "quay"
- name: POSTGRESQL_PASSWORD
value: "password"
volumeMounts:
- mountPath: /var/lib/pgsql/data
name: postgredb
serviceAccount: postgres
serviceAccountName: postgres
volumes:
- name: postgredb
persistentVolumeClaim:
claimName: postgres-storage