--- # REDIS # HINWEIS: Redis HA (Sentinel) wäre besser, aber 1 Replica ist OK für Cache # Wenn Redis ausfällt, funktioniert Outline noch (nur Features eingeschränkt) apiVersion: apps/v1 kind: Deployment metadata: name: outline-redis namespace: outline spec: replicas: 1 # HA: Optional auf Redis Sentinel upgraden selector: matchLabels: app: outline-redis template: metadata: labels: app: outline-redis spec: containers: - name: redis image: redis:alpine command: ["redis-server", "--requirepass", "$(REDIS_PASSWORD)"] ports: - containerPort: 6379 env: - name: REDIS_PASSWORD valueFrom: secretKeyRef: name: outline-secrets key: redis-password --- apiVersion: v1 kind: Service metadata: name: outline-redis namespace: outline spec: ports: - port: 6379 targetPort: 6379 selector: app: outline-redis --- # POSTGRES # HINWEIS: PostgreSQL HA benötigt Replication (Primary/Standby), nicht einfach mehr Replicas! # ReadWriteOnce PVC kann nur auf einem Pod gemountet werden # Für HA: Patroni + etcd oder Managed PostgreSQL verwenden apiVersion: apps/v1 kind: StatefulSet metadata: name: outline-postgres namespace: outline spec: serviceName: outline-postgres replicas: 1 # HA: PostgreSQL Replication erforderlich (Patroni + etcd) selector: matchLabels: app: outline-postgres template: metadata: labels: app: outline-postgres spec: containers: - name: postgres image: postgres:15-alpine ports: - containerPort: 5432 env: - name: POSTGRES_DB value: outline - name: POSTGRES_USER value: outline - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: name: outline-secrets key: postgres-password volumeMounts: - name: postgres-data mountPath: /var/lib/postgresql/data volumeClaimTemplates: - metadata: name: postgres-data spec: accessModes: [ "ReadWriteOnce" ] resources: requests: storage: 5Gi --- apiVersion: v1 kind: Service metadata: name: outline-postgres namespace: outline spec: ports: - port: 5432 targetPort: 5432 selector: app: outline-postgres