- Namespace `outline` with Postgres 16, Redis 7, and Outline 1.10.0 - Stateful pods pinned to Hetzner location `fsn1` (encrypted CSI volumes) - Pocket ID OIDC integration (group-restricted to outline_admins/outline_members) - Hetzner Object Storage bucket `outline-basicstack` (region hel1) with CORS - Traefik Ingress with cert-manager `letsencrypt-prod` (DNS-01) - Sealed secrets for postgres, app (SECRET_KEY/UTILS_SECRET/URLs), OIDC, S3 - Argo CD Application `outline` in `apps/app-outline.yaml` SMTP notifications deferred (see apps/outline/README.md). Co-Authored-By: Paperclip <noreply@paperclip.ing>
100 lines
2.3 KiB
YAML
100 lines
2.3 KiB
YAML
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: outline-postgres
|
|
namespace: outline
|
|
labels:
|
|
app: outline-postgres
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: outline-postgres
|
|
ports:
|
|
- name: postgres
|
|
port: 5432
|
|
targetPort: 5432
|
|
protocol: TCP
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: outline-postgres
|
|
namespace: outline
|
|
labels:
|
|
app: outline-postgres
|
|
spec:
|
|
serviceName: outline-postgres
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: outline-postgres
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: outline-postgres
|
|
spec:
|
|
affinity:
|
|
nodeAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
nodeSelectorTerms:
|
|
- matchExpressions:
|
|
- key: csi.hetzner.cloud/location
|
|
operator: In
|
|
values:
|
|
- fsn1
|
|
containers:
|
|
- name: postgres
|
|
image: postgres:16-alpine
|
|
imagePullPolicy: IfNotPresent
|
|
ports:
|
|
- name: postgres
|
|
containerPort: 5432
|
|
protocol: TCP
|
|
envFrom:
|
|
- secretRef:
|
|
name: outline-postgres-credentials
|
|
env:
|
|
- name: PGDATA
|
|
value: /var/lib/postgresql/data/pgdata
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 1Gi
|
|
readinessProbe:
|
|
exec:
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB"
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 6
|
|
livenessProbe:
|
|
exec:
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- pg_isready -U "$POSTGRES_USER" -d "$POSTGRES_DB"
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 30
|
|
timeoutSeconds: 5
|
|
failureThreshold: 6
|
|
volumeMounts:
|
|
- name: postgres-data
|
|
mountPath: /var/lib/postgresql/data
|
|
subPath: pgdata
|
|
volumeClaimTemplates:
|
|
- metadata:
|
|
name: postgres-data
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
storageClassName: hcloud-volumes-encrypted
|
|
resources:
|
|
requests:
|
|
storage: 10Gi
|