Files

65 lines
1.4 KiB
YAML

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: authentik-postgres-pvc
namespace: authentik
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: authentik-postgresql
namespace: authentik
spec:
replicas: 1
selector:
matchLabels: {app: authentik-postgresql}
template:
metadata:
labels: {app: authentik-postgresql}
spec:
containers:
- name: postgresql
image: postgres:16-alpine
env:
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: authentik-postgres-secret
key: POSTGRES_PASSWORD
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: authentik-postgres-secret
key: POSTGRES_USER
- name: POSTGRES_DB
valueFrom:
secretKeyRef:
name: authentik-postgres-secret
key: POSTGRES_DB
ports:
- containerPort: 5432
volumeMounts:
- name: postgres-data
mountPath: /var/lib/postgresql/data
volumes:
- name: postgres-data
persistentVolumeClaim:
claimName: authentik-postgres-pvc
---
apiVersion: v1
kind: Service
metadata:
name: authentik-postgresql
namespace: authentik
spec:
selector:
app: authentik-postgresql
ports:
- port: 5432