Docker-Images bauen und veroeffentlichen / build-and-push (push) Successful in 2m17s
Auf Wunsch des Betreibers auf das Noetige reduziert: StatefulSet PostgreSQL, Services, Ingress, App-Deployment, zwei SMB-PersistentVolumes (Postgres-Daten, Medien). Beibehalten nach Absprache: Worker-CronJob (Folgeraten, Reservierungsfreigabe, Mail-Wiederholung), ConfigMap und die NetworkPolicies (Sicherheitsbefund Rate-Limit-Umgehung). - Migration als initContainer im App-Deployment statt eigenem Job - Entfernt: Backup-CronJob/-Volume (NAS sichert die Freigabe), Migrations-CronJob, PodDisruptionBudget, HTTP-Redirect-Ingress und Middleware, Namespace-Objekt (einmalig von Hand anzulegen) - PostgreSQL auf SMB als bewusste, dokumentierte Ausnahme mit hard, cache=strict, SMB 3.1.1 + seal, uid 70 / 0700 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
# Der Namespace "artista" wird einmalig von Hand angelegt:
|
|
# kubectl create namespace artista
|
|
# kubectl label namespace artista pod-security.kubernetes.io/enforce=restricted
|
|
#
|
|
# Nicht geheime Einstellungen. Geheimnisse: k8s/secret.example.yaml.
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: artista-modelcamp-config
|
|
data:
|
|
APP_ENV: "production"
|
|
APP_URL: "https://modelcamp.example.org"
|
|
DATABASE_POOL_SIZE: "10"
|
|
MAIL_TRANSPORT: "smtp"
|
|
MAIL_FROM: "ARTISTA MODELCAMP <[email protected]>"
|
|
ADMIN_NOTIFY_EMAIL: ""
|
|
SMTP_PORT: "587"
|
|
SMTP_SECURE: "false"
|
|
MEDIA_DIR: "/app/media"
|
|
EXTERNAL_VIDEO_PROVIDER: "none"
|
|
---
|
|
# Die Datenbank ist nur fuer Pods mit dem Label artista/db-client erreichbar
|
|
# (App inkl. Migrations-initContainer, Worker).
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: artista-modelcamp-postgres-access
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: artista-modelcamp-postgres
|
|
policyTypes: ["Ingress"]
|
|
ingress:
|
|
- from:
|
|
- podSelector:
|
|
matchLabels:
|
|
artista/db-client: "true"
|
|
ports:
|
|
- port: 5432
|