feat(wiki): deploy Wiki.js in the suite (#0048) — waits on the DB secret
Wiki.js + a dedicated Postgres + public ingress for wiki.axion1337.chat, added to the production kustomization so Flux applies it. Both pods intentionally wait on the SOPS secret `wikijs-postgres-secret` (username/password) until sorb creates it — same loud-but-visible pattern as the concierge bot. NetworkPolicy: Traefik -> wikijs:http, wikijs -> wikijs-postgres:postgres (ingress-only, named container ports). Ingress/Cert mirror the authentik pattern (letsencrypt-prod). Native OIDC login (#0049, guide 10) and git-storage are configured post-start. All manifests validated server-side (kubectl --dry-run=server).
This commit is contained in:
@@ -53,6 +53,10 @@ resources:
|
|||||||
# Client-seitiger Scan-Dienst für verschlüsselte Räume (Issue #19-Erweiterung)
|
# Client-seitiger Scan-Dienst für verschlüsselte Räume (Issue #19-Erweiterung)
|
||||||
- clamav-http-scanner.yaml
|
- clamav-http-scanner.yaml
|
||||||
- concierge-bot.yaml
|
- concierge-bot.yaml
|
||||||
|
# Wiki.js (Plattform-Wiki, ADR-0014, #0048) - wartet auf wikijs-postgres-secret
|
||||||
|
- wikijs-postgres.yaml
|
||||||
|
- wikijs.yaml
|
||||||
|
- wiki-ingress.yaml
|
||||||
|
|
||||||
# Synapse-Modul als eigene Datei gepflegt (lintbar/testbar), aber als ConfigMap gemounted -
|
# Synapse-Modul als eigene Datei gepflegt (lintbar/testbar), aber als ConfigMap gemounted -
|
||||||
# disableNameSuffixHash, da der Name in synapse-values.yaml's eingebettetem values.yaml
|
# disableNameSuffixHash, da der Name in synapse-values.yaml's eingebettetem values.yaml
|
||||||
|
|||||||
@@ -359,3 +359,45 @@ spec:
|
|||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: http
|
port: http
|
||||||
|
---
|
||||||
|
# wiki.axion1337.chat (Traefik) -> Wiki.js (ADR-0014, #0048)
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: allow-ingress-wikijs
|
||||||
|
namespace: matrix
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: wikijs
|
||||||
|
policyTypes:
|
||||||
|
- Ingress
|
||||||
|
ingress:
|
||||||
|
- from:
|
||||||
|
- namespaceSelector:
|
||||||
|
matchLabels:
|
||||||
|
kubernetes.io/metadata.name: kube-system
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: http
|
||||||
|
---
|
||||||
|
# Wiki.js -> sein eigener Postgres (nur von Wiki.js-Pods erreichbar)
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: NetworkPolicy
|
||||||
|
metadata:
|
||||||
|
name: allow-ingress-wikijs-postgres
|
||||||
|
namespace: matrix
|
||||||
|
spec:
|
||||||
|
podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: wikijs-postgres
|
||||||
|
policyTypes:
|
||||||
|
- Ingress
|
||||||
|
ingress:
|
||||||
|
- from:
|
||||||
|
- podSelector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: wikijs
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: postgres
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# Öffentlicher Zugang zum Wiki.js unter wiki.axion1337.chat (ADR-0014, #0048).
|
||||||
|
# Muster wie apps/authentik/{certificate,ingress}.yaml. DNS-A-Record auf
|
||||||
|
# 49.13.132.245 ist von sorb angelegt. Login läuft nativ über Authentik-OIDC
|
||||||
|
# (kein Forward-Auth) — siehe Guide 10 / #0049.
|
||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Certificate
|
||||||
|
metadata:
|
||||||
|
name: wiki-axion1337-chat-cert
|
||||||
|
namespace: matrix
|
||||||
|
spec:
|
||||||
|
secretName: wiki-axion1337-chat-tls
|
||||||
|
issuerRef:
|
||||||
|
name: letsencrypt-prod
|
||||||
|
kind: ClusterIssuer
|
||||||
|
dnsNames:
|
||||||
|
- wiki.axion1337.chat
|
||||||
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: wikijs
|
||||||
|
namespace: matrix
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
tls:
|
||||||
|
secretName: wiki-axion1337-chat-tls
|
||||||
|
routes:
|
||||||
|
- match: Host(`wiki.axion1337.chat`)
|
||||||
|
kind: Rule
|
||||||
|
services:
|
||||||
|
- name: wikijs
|
||||||
|
port: 3000
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
# Dedizierter Postgres für Wiki.js (ADR-0014, #0048). Bewusst eigenständig statt in
|
||||||
|
# den Synapse-/Authentik-DBs, damit das Wiki als Suite-Baustein reproduzierbar bleibt.
|
||||||
|
# git ist die Inhalts-Quelle (Wiki.js Git-Storage), diese DB ist Laufzeit-Index/Cache.
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: wikijs-postgres-data
|
||||||
|
namespace: matrix
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: local-path
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 2Gi
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: wikijs-postgres
|
||||||
|
namespace: matrix
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate # RWO-Volume: kein RollingUpdate mit zwei Pods
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: wikijs-postgres
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: wikijs-postgres
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: postgres
|
||||||
|
image: postgres:16-alpine
|
||||||
|
ports:
|
||||||
|
- name: postgres
|
||||||
|
containerPort: 5432
|
||||||
|
env:
|
||||||
|
- name: POSTGRES_DB
|
||||||
|
value: wiki
|
||||||
|
- name: POSTGRES_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: wikijs-postgres-secret
|
||||||
|
key: username
|
||||||
|
- name: POSTGRES_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: wikijs-postgres-secret
|
||||||
|
key: password
|
||||||
|
- name: PGDATA
|
||||||
|
value: /var/lib/postgresql/data/pgdata
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /var/lib/postgresql/data
|
||||||
|
readinessProbe:
|
||||||
|
exec:
|
||||||
|
command: ["pg_isready", "-U", "wiki", "-d", "wiki"]
|
||||||
|
initialDelaySeconds: 5
|
||||||
|
periodSeconds: 10
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: wikijs-postgres-data
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: wikijs-postgres
|
||||||
|
namespace: matrix
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: wikijs-postgres
|
||||||
|
ports:
|
||||||
|
- name: postgres
|
||||||
|
port: 5432
|
||||||
|
targetPort: postgres
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
# Wiki.js — Plattform-Wiki (ADR-0014, #0048). Öffentlich unter wiki.axion1337.chat
|
||||||
|
# (Ingress/Cert in wiki-ingress.yaml), Login nativ via Authentik-OIDC (#0049, Guide 10).
|
||||||
|
# Git-Storage (Inhalt in git) wird nach dem ersten Start in der Admin-UI eingerichtet.
|
||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: wikijs-data
|
||||||
|
namespace: matrix
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: local-path
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 2Gi
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: wikijs
|
||||||
|
namespace: matrix
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate # RWO-Volume (Git-Storage-Klon)
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app.kubernetes.io/name: wikijs
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app.kubernetes.io/name: wikijs
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: wikijs
|
||||||
|
image: ghcr.io/requarks/wiki:2.5
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 3000
|
||||||
|
env:
|
||||||
|
- name: DB_TYPE
|
||||||
|
value: postgres
|
||||||
|
- name: DB_HOST
|
||||||
|
value: wikijs-postgres
|
||||||
|
- name: DB_PORT
|
||||||
|
value: "5432"
|
||||||
|
- name: DB_NAME
|
||||||
|
value: wiki
|
||||||
|
- name: DB_USER
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: wikijs-postgres-secret
|
||||||
|
key: username
|
||||||
|
- name: DB_PASS
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: wikijs-postgres-secret
|
||||||
|
key: password
|
||||||
|
volumeMounts:
|
||||||
|
- name: data
|
||||||
|
mountPath: /wiki/data
|
||||||
|
readinessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 25
|
||||||
|
periodSeconds: 10
|
||||||
|
livenessProbe:
|
||||||
|
tcpSocket:
|
||||||
|
port: http
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
periodSeconds: 20
|
||||||
|
volumes:
|
||||||
|
- name: data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: wikijs-data
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: wikijs
|
||||||
|
namespace: matrix
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
app.kubernetes.io/name: wikijs
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 3000
|
||||||
|
targetPort: http
|
||||||
Reference in New Issue
Block a user