45 lines
981 B
YAML
45 lines
981 B
YAML
|
|
apiVersion: apps/v1
|
||
|
|
kind: Deployment
|
||
|
|
metadata:
|
||
|
|
name: keycloak-postgres
|
||
|
|
namespace: security
|
||
|
|
spec:
|
||
|
|
replicas: 1
|
||
|
|
selector:
|
||
|
|
matchLabels:
|
||
|
|
app: keycloak-postgres
|
||
|
|
template:
|
||
|
|
metadata:
|
||
|
|
labels:
|
||
|
|
app: keycloak-postgres
|
||
|
|
spec:
|
||
|
|
containers:
|
||
|
|
- name: postgres
|
||
|
|
image: postgres:15-alpine
|
||
|
|
envFrom:
|
||
|
|
- secretRef:
|
||
|
|
name: keycloak-postgres-credentials
|
||
|
|
volumeMounts:
|
||
|
|
- name: data
|
||
|
|
mountPath: /var/lib/postgresql/data
|
||
|
|
subPath: postgres-data
|
||
|
|
volumes:
|
||
|
|
- name: data
|
||
|
|
persistentVolumeClaim:
|
||
|
|
claimName: keycloak-db-pvc
|
||
|
|
---
|
||
|
|
apiVersion: v1
|
||
|
|
kind: PersistentVolumeClaim
|
||
|
|
metadata:
|
||
|
|
name: keycloak-db-pvc
|
||
|
|
namespace: security
|
||
|
|
labels:
|
||
|
|
recurring-job.longhorn.io/source: "enabled"
|
||
|
|
recurring-job-group.longhorn.io/critical-data: "enabled"
|
||
|
|
spec:
|
||
|
|
accessModes: ["ReadWriteOnce"]
|
||
|
|
storageClassName: "longhorn"
|
||
|
|
resources:
|
||
|
|
requests:
|
||
|
|
storage: 5Gi
|