atform.apps.keycloak-db.4.0.201.source-code.deployment.yml Maven / Gradle / Ivy
metadata:
name: keycloak-db
labels:
service: keycloak-db
spec:
replicas: 1
selector:
service: keycloak-db
template:
metadata:
labels:
service: keycloak-db
spec:
containers:
- name: keycloak-db
image: registry.centos.org/postgresql/postgresql:9.6
imagePullPolicy: IfNotPresent
env:
- name: POSTGRESQL_DATABASE
value: keycloak
- name: POSTGRESQL_PASSWORD
value: keycloak
- name: POSTGRESQL_USER
value: keycloak
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
livenessProbe:
exec:
command:
- sh
- -c
- exec pg_isready --host $POD_IP
initialDelaySeconds: 60
timeoutSeconds: 5
failureThreshold: 6
readinessProbe:
exec:
command:
- sh
- -c
- exec pg_isready --host $POD_IP
initialDelaySeconds: 20
timeoutSeconds: 3
periodSeconds: 5
ports:
- containerPort: 5432
protocol: TCP
volumeMounts:
- mountPath: /var/lib/pgsql
name: keycloak-db-postgresql-data
readOnly: false
volumes:
- name: keycloak-db-postgresql-data
persistentVolumeClaim:
claimName: keycloak-db-postgresql-data