Turns guest onboarding from an admin-only click in the Authentik UI into a traceable command a defined circle can run: !einladen creates a single-use invitation valid for three days, !verlaengern extends it twice at most, !freischalten makes it permanent, and expired accounts are deactivated automatically. Authorisation is deliberately twofold - the Authentik group decides, the invite room makes it visible. A group alone leaves no trace of who invited whom; a room alone would authorise anyone who gets in. Two deployment details matter: exactly one replica with Recreate, because a second instance would execute every command twice; and the script ConfigMap keeps its name hash so a change actually restarts the pod, avoiding the trap described in #50. Endpoints and field names were taken from the running Authentik OpenAPI schema, not guessed. Refs axion1337.chat/axion1337.chat-gitops#48
76 lines
2.8 KiB
YAML
76 lines
2.8 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
|
|
# 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
|
|
|
|
# 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
|