81 lines
2.1 KiB
YAML
81 lines
2.1 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
argocd.argoproj.io/sync-wave: "1"
|
|
name: postgresql
|
|
namespace: trusted-profile-analyzer
|
|
spec:
|
|
replicas: 1
|
|
revisionHistoryLimit: 10
|
|
selector:
|
|
matchLabels:
|
|
name: postgresql
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
name: postgresql
|
|
spec:
|
|
containers:
|
|
- env:
|
|
- name: POSTGRESQL_USER
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: database-user
|
|
name: postgresql
|
|
- name: POSTGRESQL_PASSWORD
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: database-password
|
|
name: postgresql
|
|
- name: POSTGRESQL_DATABASE
|
|
valueFrom:
|
|
secretKeyRef:
|
|
key: database-name
|
|
name: postgresql
|
|
image: image-registry.openshift-image-registry.svc:5000/openshift/postgresql:15-el8
|
|
imagePullPolicy: IfNotPresent
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- /usr/libexec/check-container
|
|
- --live
|
|
failureThreshold: 3
|
|
initialDelaySeconds: 120
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 10
|
|
name: postgresql
|
|
ports:
|
|
- containerPort: 5432
|
|
protocol: TCP
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- /usr/libexec/check-container
|
|
failureThreshold: 3
|
|
initialDelaySeconds: 5
|
|
periodSeconds: 10
|
|
successThreshold: 1
|
|
timeoutSeconds: 1
|
|
resources:
|
|
limits:
|
|
memory: 512Mi
|
|
securityContext:
|
|
privileged: false
|
|
terminationMessagePath: /dev/termination-log
|
|
terminationMessagePolicy: File
|
|
volumeMounts:
|
|
- mountPath: /var/lib/pgsql/data
|
|
name: postgresql-data
|
|
dnsPolicy: ClusterFirst
|
|
restartPolicy: Always
|
|
schedulerName: default-scheduler
|
|
terminationGracePeriodSeconds: 30
|
|
volumes:
|
|
- name: postgresql-data
|
|
persistentVolumeClaim:
|
|
claimName: postgresql
|