From 3837a10b155cb237237f8587c51974f489625aec Mon Sep 17 00:00:00 2001 From: funman300 Date: Wed, 13 May 2026 22:03:07 -0700 Subject: [PATCH] fix(deploy): use matomo.php for liveness/readiness probes /index.php returns 302 after tables are created (installer redirect), which fails k8s HTTP probes. /matomo.php is the tracker endpoint and always returns 200 regardless of installation state. Also add timeoutSeconds: 5 since PHP startup can exceed the 1s default. Co-Authored-By: Claude Sonnet 4.6 --- deploy/matomo-deployment.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/deploy/matomo-deployment.yaml b/deploy/matomo-deployment.yaml index 6707331..fd7e20e 100644 --- a/deploy/matomo-deployment.yaml +++ b/deploy/matomo-deployment.yaml @@ -40,6 +40,13 @@ spec: secretKeyRef: name: matomo-secret key: MYSQL_PASSWORD + # Traefik terminates SSL; tell Matomo to trust X-Forwarded-* headers + - name: MATOMO_GENERAL_ASSUME_SECURE_PROTOCOL + value: "1" + - name: MATOMO_GENERAL_PROXY_CLIENT_HEADERS + value: HTTP_X_FORWARDED_FOR + - name: MATOMO_GENERAL_PROXY_HOST_HEADERS + value: HTTP_X_FORWARDED_HOST ports: - containerPort: 80 volumeMounts: @@ -47,16 +54,18 @@ spec: mountPath: /var/www/html livenessProbe: httpGet: - path: /index.php + path: /matomo.php port: 80 initialDelaySeconds: 60 periodSeconds: 30 + timeoutSeconds: 5 readinessProbe: httpGet: - path: /index.php + path: /matomo.php port: 80 initialDelaySeconds: 30 periodSeconds: 10 + timeoutSeconds: 5 resources: requests: cpu: 100m