Kustomize-Struktur (base/overlays) entfernt. Stattdessen nummerierte Einzeldateien, ausrollbar mit "kubectl apply -f k8s/": 00-namespace, 01-config, 02-storage (SMB-PVs/PVCs Postgres + Medien), 03-postgres (StatefulSet + Service), 04-app (Deployment mit Migrations-initContainer + Service), 05-ingress, 06-worker, 07-networkpolicy. Secrets als secrets.yaml.example (echte secrets.yaml ist gitignored). Images mit Tag latest aus der Gitea-Pipeline. Kurzanleitung in k8s/README.md, Betriebsdoku angepasst. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
36 lines
831 B
YAML
36 lines
831 B
YAML
# Datenbank nur fuer App und Worker erreichbar; App nur ueber Traefik.
|
|
# ANPASSEN: Namespace deines Traefik ("kubectl get pods -A | grep traefik").
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: artista-modelcamp-postgres
|
|
namespace: artista
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app: artista-modelcamp-postgres
|
|
ingress:
|
|
- from:
|
|
- podSelector:
|
|
matchLabels:
|
|
db-client: "true"
|
|
ports:
|
|
- port: 5432
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: artista-modelcamp-app
|
|
namespace: artista
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
app: artista-modelcamp-app
|
|
ingress:
|
|
- from:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: traefik
|
|
ports:
|
|
- port: 3000
|