forked from ungleich-public/ungleich-user
deploy/k8s/dev runs the base with 2 replicas alongside throwaway services: two independent OpenLDAP servers (the dev image), PostgreSQL 18 and Mailpit. deploy/k8s/dev/e2e.sh checks a running deployment: both probes, registration with the activation mail sent over SMTP (and no password in it), activation, login, and login and readiness while ldap1 is scaled to zero. All checks pass.
39 lines
977 B
YAML
39 lines
977 B
YAML
# Throwaway PostgreSQL for the dev overlay (emptyDir: data is lost on restart).
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: postgres
|
|
spec:
|
|
selector:
|
|
matchLabels: {app: postgres}
|
|
template:
|
|
metadata:
|
|
labels: {app: postgres}
|
|
spec:
|
|
containers:
|
|
- name: postgres
|
|
image: postgres:18-alpine
|
|
env:
|
|
- {name: POSTGRES_DB, value: ungleich_user}
|
|
- {name: POSTGRES_USER, value: ungleich_user}
|
|
- {name: POSTGRES_PASSWORD, value: dev-only}
|
|
ports:
|
|
- {containerPort: 5432}
|
|
readinessProbe:
|
|
exec:
|
|
command: ["pg_isready", "-U", "ungleich_user"]
|
|
periodSeconds: 3
|
|
volumeMounts:
|
|
- {name: data, mountPath: /var/lib/postgresql}
|
|
volumes:
|
|
- name: data
|
|
emptyDir: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: postgres
|
|
spec:
|
|
selector: {app: postgres}
|
|
ports:
|
|
- {port: 5432}
|