deploy outline wiki

This commit is contained in:
Ubuntu
2026-01-12 15:44:30 +00:00
parent 41a0f3a61e
commit a283450ba2
5 changed files with 235 additions and 0 deletions

22
apps/outline-app.yaml Normal file
View File

@@ -0,0 +1,22 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: outline
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "5"
spec:
project: default
source:
repoURL: https://git.cloud-infra.prod.openmailserver.de/stabify/gitops.git
targetRevision: HEAD
path: apps/outline
destination:
server: https://kubernetes.default.svc
namespace: outline
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true

10
apps/outline/Chart.yaml Normal file
View File

@@ -0,0 +1,10 @@
apiVersion: v2
name: outline-wrapper
description: Wrapper chart for Outline Wiki
type: application
version: 1.0.0
appVersion: "1.0.0"
dependencies:
- name: outline
repository: https://runxs-charts.github.io/community-charts
version: 0.5.4 # Prüfen ob das die aktuelle stabile Version ist, ich nehme eine gängige.

View File

@@ -0,0 +1,54 @@
# Vault Secrets für Outline anlegen
Outline benötigt viele Secrets für DB, Redis, S3 und OIDC.
Hier sind die Befehle, um diese in Vault anzulegen.
**Wichtig:** Du musst die Platzhalter (S3 Keys, OIDC Daten) mit deinen echten Daten ersetzen!
```bash
# Umgebungsvariablen für Vault setzen
export VAULT_ADDR='https://10.100.30.11:8200'
export VAULT_TOKEN='DeinRootToken'
export VAULT_CACERT='./vault-ca.crt' # Pfad anpassen
# 1. Passwörter und Keys generieren
POSTGRES_PASS=$(openssl rand -hex 16)
REDIS_PASS=$(openssl rand -hex 16)
SECRET_KEY=$(openssl rand -hex 32)
UTILS_SECRET=$(openssl rand -hex 32)
# 2. Connection Strings bauen (Interner Cluster DNS)
# Hostnames basieren auf dem Release Namen 'outline'
DB_URL="postgres://postgres:$POSTGRES_PASS@outline-postgresql.outline.svc.cluster.local:5432/outline"
REDIS_URL="redis://:$REDIS_PASS@outline-redis-master.outline.svc.cluster.local:6379"
# 3. Externe Credentials (BITTE ANPASSEN!)
# Beispiel für MinIO oder AWS S3
AWS_ACCESS_KEY="dein-access-key"
AWS_SECRET_KEY="dein-secret-key"
# Beispiel für Google/OIDC
OIDC_CLIENT_ID="deine-client-id"
OIDC_CLIENT_SECRET="dein-client-secret"
OIDC_AUTH_URI="https://accounts.google.com/o/oauth2/v2/auth"
OIDC_TOKEN_URI="https://oauth2.googleapis.com/token"
OIDC_USERINFO_URI="https://openidconnect.googleapis.com/v1/userinfo"
# 4. Alles in Vault schreiben
vault kv put secret/apps/outline \
secret_key="$SECRET_KEY" \
utils_secret="$UTILS_SECRET" \
database_url="$DB_URL" \
redis_url="$REDIS_URL" \
postgres_password="$POSTGRES_PASS" \
redis_password="$REDIS_PASS" \
aws_access_key_id="$AWS_ACCESS_KEY" \
aws_secret_access_key="$AWS_SECRET_KEY" \
oidc_client_id="$OIDC_CLIENT_ID" \
oidc_client_secret="$OIDC_CLIENT_SECRET" \
oidc_auth_uri="$OIDC_AUTH_URI" \
oidc_token_uri="$OIDC_TOKEN_URI" \
oidc_userinfo_uri="$OIDC_USERINFO_URI"
```
Nachdem du das ausgeführt hast, synchronisiert ArgoCD/ExternalSecrets diese Daten in den Cluster.

View File

@@ -0,0 +1,83 @@
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: outline-secrets
namespace: outline
spec:
refreshInterval: 1m
secretStoreRef:
name: vault-backend
kind: ClusterSecretStore
target:
name: outline-secrets
creationPolicy: Owner
data:
# Generelle Outline Secrets
- secretKey: SECRET_KEY
remoteRef:
key: secret/apps/outline
property: secret_key
- secretKey: UTILS_SECRET
remoteRef:
key: secret/apps/outline
property: utils_secret
# Datenbank URLs (muss zusammengebaut werden oder direkt in Vault liegen)
# Wir bauen die URL im Vault zusammen oder hier?
# Outline erwartet DATABASE_URL als kompletten String.
# Format: postgres://user:password@host:5432/dbname
# Host für internes Postgres: outline-postgresql
- secretKey: DATABASE_URL
remoteRef:
key: secret/apps/outline
property: database_url
# Redis URL
# Format: redis://:password@host:6379
# Host für internes Redis: outline-redis-master
- secretKey: REDIS_URL
remoteRef:
key: secret/apps/outline
property: redis_url
# Passwörter für die Subcharts (damit die Pods starten können)
- secretKey: postgres-password
remoteRef:
key: secret/apps/outline
property: postgres_password
- secretKey: redis-password
remoteRef:
key: secret/apps/outline
property: redis_password
# S3 Storage Credentials
- secretKey: AWS_ACCESS_KEY_ID
remoteRef:
key: secret/apps/outline
property: aws_access_key_id
- secretKey: AWS_SECRET_ACCESS_KEY
remoteRef:
key: secret/apps/outline
property: aws_secret_access_key
# OIDC Credentials
- secretKey: OIDC_CLIENT_ID
remoteRef:
key: secret/apps/outline
property: oidc_client_id
- secretKey: OIDC_CLIENT_SECRET
remoteRef:
key: secret/apps/outline
property: oidc_client_secret
- secretKey: OIDC_AUTH_URI
remoteRef:
key: secret/apps/outline
property: oidc_auth_uri
- secretKey: OIDC_TOKEN_URI
remoteRef:
key: secret/apps/outline
property: oidc_token_uri
- secretKey: OIDC_USERINFO_URI
remoteRef:
key: secret/apps/outline
property: oidc_userinfo_uri

66
apps/outline/values.yaml Normal file
View File

@@ -0,0 +1,66 @@
outline:
image:
repository: outlinewiki/outline
tag: latest
# URL Configuration
url: https://kb.apps.k3s.stabify.de
# Secrets (werden via ExternalSecrets injected)
secret:
existingSecret: "outline-secrets"
# Die Keys im Secret müssen matchen:
# SECRET_KEY, UTILS_SECRET, DATABASE_URL, REDIS_URL
# AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
# OIDC_CLIENT_SECRET, etc.
# Storage (S3) - Diese Werte kommen z.T. aus dem Secret oder hier hardcoded wenn öffentlich
storage:
storageType: s3
s3:
bucket: "outline"
region: "us-east-1" # Bei MinIO/Cloudflare oft egal, aber nötig
# uploadBucketUrl: "https://..." # Optional, falls public access anders ist
# endpoint: "https://..." # Muss in Vault oder hier gesetzt werden. Ich setze es hier als Placeholder.
# Authentication
auth:
oidc:
enabled: true
displayName: "OIDC Login"
# scopes: "openid profile email"
# PostgreSQL Dependency Configuration
postgresql:
enabled: true
auth:
existingSecret: "outline-secrets"
secretKeys:
adminPasswordKey: "postgres-password"
userPasswordKey: "postgres-password"
primary:
persistence:
enabled: true
size: 8Gi
# Redis Dependency Configuration
redis:
enabled: true
architecture: standalone
auth:
existingSecret: "outline-secrets"
existingSecretPasswordKey: "redis-password"
ingress:
enabled: true
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:
- host: kb.apps.k3s.stabify.de
paths:
- path: /
pathType: Prefix
tls:
- secretName: outline-tls
hosts:
- kb.apps.k3s.stabify.de