diff --git a/kubernetes/apps/paperless/paperless.yaml b/kubernetes/apps/paperless/paperless.yaml index 32de58cb..c0566eb0 100644 --- a/kubernetes/apps/paperless/paperless.yaml +++ b/kubernetes/apps/paperless/paperless.yaml @@ -155,21 +155,33 @@ spec: - name: bridge-cert mountPath: /shared readOnly: true - # TCP probes — HTTP probes against /api/ flooded the - # `paperless.auth` logger every 10 s with "No authentication - # provided from private IP …". With ENABLE_HTTP_REMOTE_USER - # the middleware logs every unauth API request, and there's - # no public health endpoint to probe. TCP confirms gunicorn - # is bound; that's the same liveness signal we'd get from - # /api/ minus the noise. + # /accounts/login/ rather than /api/ or a TCP connect. + # + # /api/ is unusable as a probe target: with ENABLE_HTTP_REMOTE_USER + # the remote-user middleware logs "No authentication provided from + # private IP …" for every unauthenticated API request, so probing it + # floods `paperless.auth`. Measured: four requests to /api/ produce + # four log lines, four to /accounts/login/ produce none — the + # middleware only covers the API surface. + # + # A TCP connect avoids the noise but only proves gunicorn accepted a + # socket. /accounts/login/ renders a real Django view, so URL + # routing, settings and templating all have to work. It does not + # prove Postgres is healthy; nothing cheap here does. + # + # Safe against ALLOWED_HOSTS: the kubelet sends the pod IP as Host, + # and PAPERLESS_ALLOWED_HOSTS is "*". Narrowing that value later + # means giving these probes an explicit Host header. livenessProbe: - tcpSocket: + httpGet: + path: /accounts/login/ port: http initialDelaySeconds: 120 periodSeconds: 30 timeoutSeconds: 10 readinessProbe: - tcpSocket: + httpGet: + path: /accounts/login/ port: http initialDelaySeconds: 30 periodSeconds: 10