Every chart was installed twice in a throwaway k3d cluster (origin/main vs this branch) with real Postgres/Redis/dex instances and observed for readiness ordering, stability and dependency-outage behavior. Findings: - voucher-vault: Django only accepts Hosts 127.0.0.1 and the configured DOMAIN; the default probe Host (pod IP) always got 400. Probes now send 'Host: 127.0.0.1'. - zipline: /api/healthcheck includes the database, so liveness now uses '/' (readiness/startup keep /api/healthcheck). Verified live: on a Postgres outage the pod turns NotReady within 30s and is never restarted by the kubelet. - outline: '/' also returns 500 when the database is down, so there is no dependency-free endpoint; all three probes use /_health.
127 lines
4.7 KiB
YAML
127 lines
4.7 KiB
YAML
apiVersion: apps/v1
|
|
kind: StatefulSet
|
|
metadata:
|
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-sfs
|
|
labels:
|
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-sfs
|
|
spec:
|
|
serviceName: {{ .Release.Name }}-{{ .Chart.Name }}-service
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-sfs
|
|
template:
|
|
metadata:
|
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-sfs
|
|
labels:
|
|
app: {{ .Release.Name }}-{{ .Chart.Name }}-sfs
|
|
spec:
|
|
automountServiceAccountToken: false
|
|
securityContext:
|
|
fsGroup: 1001
|
|
fsGroupChangePolicy: Always
|
|
containers:
|
|
- name: {{ .Release.Name }}-{{ .Chart.Name }}-sfs
|
|
image: "outlinewiki/outline:{{ .Chart.AppVersion }}"
|
|
imagePullPolicy: IfNotPresent
|
|
env:
|
|
- name: PORT
|
|
value: "3000"
|
|
- name: URL
|
|
value: "https://{{ .Values.ingress.domain }}"
|
|
- name: SECRET_KEY
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-secret
|
|
key: outline-secret-key
|
|
- name: UTILS_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-secret
|
|
key: outline-utils-secret
|
|
- name: DATABASE_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-db-secret
|
|
key: connection-url
|
|
- name: PGSSLMODE
|
|
value: disable
|
|
- name: REDIS_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-redis-secret
|
|
key: connection-url
|
|
- name: FILE_STORAGE
|
|
value: "local"
|
|
- name: FILE_STORAGE_LOCAL_ROOT_DIR
|
|
value: "/outline-data/data"
|
|
- name: OIDC_ISSUER_URL
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-secret
|
|
key: discovery-url
|
|
- name: OIDC_CLIENT_ID
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-secret
|
|
key: client-id
|
|
- name: OIDC_CLIENT_SECRET
|
|
valueFrom:
|
|
secretKeyRef:
|
|
name: {{ .Release.Name }}-{{ .Chart.Name }}-secret
|
|
key: client-secret
|
|
- name: OIDC_DISPLAY_NAME
|
|
value: "{{ .Values.outline.oidc.displayName }}"
|
|
- name: FILE_STORAGE_UPLOAD_MAX_SIZE
|
|
value: "{{ .Values.outline.maxUploadSize }}"
|
|
- name: FORCE_HTTPS
|
|
value: "{{ .Values.outline.forceHttps }}"
|
|
ports:
|
|
- containerPort: 3000
|
|
protocol: TCP
|
|
name: http
|
|
# Outline exposes a dedicated health endpoint at /_health (also used
|
|
# by the upstream Docker HEALTHCHECK). It checks Postgres and Redis;
|
|
# there is no dependency-free HTTP endpoint ("/" returns 500 too when
|
|
# the database is down), so all three probes use /_health.
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /_health
|
|
port: 3000
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /_health
|
|
port: 3000
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
# The startup probe gates liveness/readiness. Outline runs database
|
|
# migrations on startup: budget 10s * 30 = 300s.
|
|
startupProbe:
|
|
httpGet:
|
|
path: /_health
|
|
port: 3000
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 30
|
|
resources:
|
|
requests:
|
|
memory: "{{ .Values.outline.resources.requests.memory }}"
|
|
cpu: "{{ .Values.outline.resources.requests.cpu }}"
|
|
ephemeral-storage: "{{ .Values.outline.resources.requests.ephemeralStorage }}"
|
|
limits:
|
|
memory: "{{ .Values.outline.resources.limits.memory }}"
|
|
cpu: "{{ .Values.outline.resources.limits.cpu }}"
|
|
ephemeral-storage: "{{ .Values.outline.resources.limits.ephemeralStorage }}"
|
|
volumeMounts:
|
|
- mountPath: "/outline-data/data"
|
|
name: outline-data
|
|
subPath: data
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: outline-data
|
|
persistentVolumeClaim:
|
|
claimName: {{ .Release.Name }}-{{ .Chart.Name }}-pvc |