Files
gitops/apps/outline/deployment.yaml

84 lines
2.4 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: outline
namespace: outline
labels:
app: outline
spec:
replicas: 2 # HA: Mindestens 2 Replicas für Ausfallsicherheit
selector:
matchLabels:
app: outline
template:
metadata:
labels:
app: outline
spec:
affinity:
podAntiAffinity:
# Hard Rule: Pods müssen auf verschiedenen Nodes laufen
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app
operator: In
values:
- outline
topologyKey: kubernetes.io/hostname
containers:
- name: outline
image: outlinewiki/outline:latest
ports:
- containerPort: 3000
envFrom:
- secretRef:
name: outline-secrets
# Outline braucht spezielle Command/Args manchmal nicht, Docker Image hat Entrypoint.
# Wichtig: Outline braucht URL Config.
env:
- name: URL
value: "https://kb.apps.k3s.stabify.de"
- name: PORT
value: "3000"
- name: FORCE_HTTPS
value: "false"
- name: PGSSLMODE
value: "disable"
# S3 / SeaweedFS Configuration
- name: AWS_S3_UPLOAD_BUCKET_URL
value: "https://s3.apps.internal.k3s.stabify.de"
- name: AWS_S3_UPLOAD_BUCKET_NAME
value: "outline-uploads"
- name: AWS_REGION
value: "us-east-1"
- name: AWS_S3_FORCE_PATH_STYLE
value: "true" # Wichtig für SeaweedFS (Path-Style URLs statt Virtual Host)
# AWS_S3_ACL weggelassen: Default ist "private" laut GitHub Discussion #8208
- name: REDIS_COLLABORATION_URL
valueFrom:
secretKeyRef:
name: outline-secrets
key: REDIS_URL # Gleicher Redis
readinessProbe:
httpGet:
path: /
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
---
apiVersion: v1
kind: Service
metadata:
name: outline
namespace: outline
spec:
ports:
- port: 80
targetPort: 3000
protocol: TCP
name: http
selector:
app: outline