Counterpart to restore-drill.yaml: that one covers the databases, this the Synapse media store. Separate job on purpose - the database probe needs a throwaway Postgres, this one the production PVC read-only, and folding two different permission and failure pictures into one job makes an emergency harder to diagnose, not easier. The name is deliberate. BackupJobFailed already matches restore-drill.*, so a failure is covered without a new rule and reaches the maintenance room through the single alertmanager route. It re-proves its own comparison every run. After the check passes, one shared file is altered by a byte and the comparison must report it - otherwise the job fails with "this probe proves nothing". A comparison that has only ever said "equal" is a guess, and that stays true when it runs monthly rather than once. The intersection carries the proof, not the totals: the backup is a snapshot while production keeps running, and Synapse prunes its own preview caches. One-sided files are therefore tolerated in url_cache and url_cache_thumbnails and are an error anywhere else. The production PVC is mounted read-only and only emptyDir is written. On today's single node a second read-only mount of the ReadWriteOnce volume is unproblematic; the comment says what would have to change if a second node ever appeared, because that failure would alert without anything being wrong with the data. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F2Q4Ri8NGwyTZzScvKnWFM
111 lines
4.4 KiB
YAML
111 lines
4.4 KiB
YAML
apiVersion: kustomize.config.k8s.io/v1beta1
|
|
kind: Kustomization
|
|
|
|
# Patch: Fügt Checksums der element-values.yaml und des turn_shared_secret zur
|
|
# HelmRelease hinzu. Damit wird Flux die HelmRelease neu-synced (und synapse-main neu
|
|
# gestartet), wenn sich die jeweilige ConfigMap/Secret ändert - siehe Issue #38's
|
|
# Rotations-Mechanismus, der turn-secret-checksum bei jeder Rotation bumpt.
|
|
patches:
|
|
- target:
|
|
kind: HelmRelease
|
|
name: matrix-stack
|
|
namespace: matrix
|
|
patch: |-
|
|
- op: add
|
|
path: /metadata/annotations/element-config-checksum
|
|
value: "401f8a87d0ef5d91d2e5032d4aede42c"
|
|
- op: add
|
|
path: /metadata/annotations/turn-secret-checksum
|
|
value: "05aad8b742fb02c42f4c1a5629ae31e1"
|
|
|
|
resources:
|
|
- matrix-postgres-auth.yaml
|
|
- cert-issuer.yaml
|
|
- matrix-certificates.yaml
|
|
# Neue Dateien:
|
|
- custom-configs/synapse-values.yaml
|
|
- custom-configs/element-values.yaml
|
|
- custom-configs/mas-secret.yaml
|
|
- element-web-docs-configmap.yaml
|
|
- element-web-docs-server.yaml
|
|
# TURN Server für WebRTC
|
|
- coturn-secret.yaml
|
|
- coturn.yaml
|
|
- synapse-turn-secret.yaml
|
|
# HelmRelease (muss ganz unten stehen, damit die ConfigMaps vorher da sind!)
|
|
- element-server-suite.yaml
|
|
# Custom Apex Ingress für Element Web + Well-Known auf axion1337.chat
|
|
- apex-ingress.yaml # Custom Apex Ingress für Element Web + Well-Known auf axion1337.chat
|
|
- networkpolicy.yaml
|
|
# Backup zur Hetzner Storage Box (Issues #6 + #15)
|
|
- synapse-backup-secret.yaml
|
|
- synapse-backup.yaml
|
|
# Monatliche Restore-Probe: spielt die Sicherungen isoliert zurueck (#0030)
|
|
- restore-drill.yaml
|
|
- restore-drill-media.yaml
|
|
# Automatisierte TURN-Secret-Rotation (Issue #38)
|
|
- turn-secret-rotation-secret.yaml
|
|
- turn-secret-rotation.yaml
|
|
# Draupnir Moderationsbot (Issue #18)
|
|
- draupnir-secret.yaml
|
|
- draupnir-pvc.yaml
|
|
- draupnir.yaml
|
|
# ClamAV für Media-Scanning via Synapse-Modul (Issue #19)
|
|
- clamav-pvc.yaml
|
|
- clamav.yaml
|
|
# Client-seitiger Scan-Dienst für verschlüsselte Räume (Issue #19-Erweiterung)
|
|
- clamav-http-scanner.yaml
|
|
- concierge-bot.yaml
|
|
# Wiki.js (Plattform-Wiki, ADR-0014, #0048)
|
|
- wikijs-postgres-secret.yaml # SOPS, von sorb angelegt
|
|
- wikijs-admin-secret.yaml # SOPS, randomisiert — Bootstrap durch den Konfig-Job
|
|
- wikijs-oidc-secret.yaml # SOPS, client_id/secret für die OIDC-Strategy
|
|
- wikijs-git-secret.yaml # SOPS, Git-Storage-PAT nach Gitea (ADR-0015)
|
|
- wikijs-postgres.yaml
|
|
- wikijs.yaml
|
|
- wiki-ingress.yaml
|
|
- wikijs-config.yaml # Konfig-Job (headless Setup + OIDC + Rollen)
|
|
- wikijs-postgres-backup.yaml # Nächtliches Borg-Backup der Wiki-DB (#0048)
|
|
- wikijs-gruppenpruefung.yaml # Tägliche Prüfung auf Nutzer ohne Gruppe (#0103)
|
|
|
|
# Synapse-Modul als eigene Datei gepflegt (lintbar/testbar), aber als ConfigMap gemounted -
|
|
# disableNameSuffixHash, da der Name in synapse-values.yaml's eingebettetem values.yaml
|
|
# referenziert wird (kustomize kann Referenzen nicht in opaken YAML-Strings umschreiben).
|
|
configMapGenerator:
|
|
# ⚠️ Bewusst OHNE disableNameSuffixHash: Der Hash im ConfigMap-Namen aendert
|
|
# sich mit dem Skript, kustomize zieht die Referenz im Deployment nach, und
|
|
# der Pod startet dadurch von selbst neu. Ohne das haetten wir wieder den
|
|
# Fall aus gitops#50 - geaenderte Datei im Repo, alter Stand im laufenden
|
|
# Prozess, und niemand merkt es.
|
|
- name: concierge-bot-script
|
|
namespace: matrix
|
|
files:
|
|
- concierge-bot.py
|
|
- name: synapse-clamav-module
|
|
namespace: matrix
|
|
files:
|
|
- clamav_spam_checker.py
|
|
options:
|
|
disableNameSuffixHash: true
|
|
- name: wikijs-config-script
|
|
namespace: matrix
|
|
files:
|
|
- wikijs-config.py
|
|
options:
|
|
disableNameSuffixHash: true
|
|
# Gemeinsame Branding-Assets (eine Quelle). Binärdateien -> kustomize legt sie als
|
|
# binaryData ab. MIT Namens-Hash: ändert sich ein Asset, zieht der Deployment-Verweis
|
|
# nach und der Pod startet mit dem neuen Bild neu. Kann später auch in Authentik/Element
|
|
# gemountet werden, um dieselbe Datei nicht mehrfach zu pflegen.
|
|
- name: platform-branding
|
|
namespace: matrix
|
|
files:
|
|
- branding/logo.png
|
|
- branding/alpenglow.jpg
|
|
- branding/favicon.ico
|
|
- branding/favicons/favicon-32x32.png
|
|
- branding/favicons/favicon-16x16.png
|
|
- branding/favicons/android-chrome-192x192.png
|
|
- branding/favicons/apple-touch-icon.png
|
|
- branding/favicons/mstile-150x150.png
|