refactor(k8s): Aufbau wie Wabenhain/ApiCore, Zertifikat funktionsfaehig
Docker-Images bauen und veroeffentlichen / build-and-push (push) Successful in 3m2s

- Dateinamen nach Wabenhain-Schema (01-configmap, 02-secret,
  03-storage, 04-postgres, 05-app-deployment, 06-ingress,
  07-worker-cronjob, 08-networkpolicy); Secret-Vorlage als
  02-secret.yaml.example, echte 02-secret.yaml gitignored.
- Namespace: Pod Security "baseline" erzwungen, "restricted" als warn/audit.
  "restricted" kann den HTTP-01-Solver-Pod von cert-manager abweisen und
  damit die Zertifikatsausstellung blockieren.
- NetworkPolicy nur noch fuer PostgreSQL; keine Policy vor der App (wie
  Wabenhain/ApiCore), da sie bei Traefik im Host-Netzwerk die Seite sperrt.
- README: kompletter Neuaufbau inkl. Freigabe der Retain-PVs nach
  "kubectl delete namespace", Zertifikats-Diagnose.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Nick SzaunigandClaude Opus 5.5 committed 2026-09-28 11:26:13 +02:00
1 parent d813d56514
commit a0ba921d19
12 files changed
+70 -71

No files matched your search

+63
View File
@@ -0,0 +1,63 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: artista-modelcamp-postgres
namespace: artista
spec:
serviceName: artista-modelcamp-postgres
replicas: 1
selector:
matchLabels:
app: artista-modelcamp-postgres
template:
metadata:
labels:
app: artista-modelcamp-postgres
spec:
automountServiceAccountToken: false
terminationGracePeriodSeconds: 120 # sauber herunterfahren vor dem Aushaengen
securityContext:
runAsNonRoot: true
runAsUser: 70
runAsGroup: 70
seccompProfile: { type: RuntimeDefault }
containers:
- name: postgres
image: postgres:18.1-alpine
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: artista
- name: POSTGRES_DB
value: artista
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef: { name: artista-modelcamp-secrets, key: DB_PASSWORD }
volumeMounts:
- name: data
mountPath: /var/lib/postgresql
readinessProbe:
exec: { command: ["pg_isready", "-U", "artista"] }
periodSeconds: 5
resources:
requests: { cpu: 100m, memory: 256Mi }
limits: { memory: 1Gi }
securityContext:
allowPrivilegeEscalation: false
capabilities: { drop: ["ALL"] }
volumes:
- name: data
persistentVolumeClaim: { claimName: artista-modelcamp-postgres }
---
apiVersion: v1
kind: Service
metadata:
name: artista-modelcamp-postgres
namespace: artista
spec:
clusterIP: None
selector:
app: artista-modelcamp-postgres
ports:
- port: 5432