From f67cbf4465bccdfc712c5540c7eff04ebe8c2e41 Mon Sep 17 00:00:00 2001 From: Jeffrey Smeets Date: Thu, 27 Aug 2026 20:56:16 +0200 Subject: [PATCH] netbox: send a Host header on the probes The kubelet probes the pod IP, which Django rejects with a 400 because ALLOWED_HOSTS is netbox.jsme.be. Setting the Host header keeps ALLOWED_HOSTS tight instead of widening it to '*'. --- applications/netbox/netbox/deployment.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/applications/netbox/netbox/deployment.yaml b/applications/netbox/netbox/deployment.yaml index b8e567f..70c3cd3 100644 --- a/applications/netbox/netbox/deployment.yaml +++ b/applications/netbox/netbox/deployment.yaml @@ -50,6 +50,10 @@ spec: httpGet: path: /login/ port: 8080 + # Django rejects the pod IP as a Host header (ALLOWED_HOSTS). + httpHeaders: + - name: Host + value: netbox.jsme.be periodSeconds: 10 # Generous: the entrypoint runs migrations before granian binds. failureThreshold: 60 @@ -57,11 +61,19 @@ spec: httpGet: path: /login/ port: 8080 + # Django rejects the pod IP as a Host header (ALLOWED_HOSTS). + httpHeaders: + - name: Host + value: netbox.jsme.be periodSeconds: 15 livenessProbe: httpGet: path: /login/ port: 8080 + # Django rejects the pod IP as a Host header (ALLOWED_HOSTS). + httpHeaders: + - name: Host + value: netbox.jsme.be periodSeconds: 30 failureThreshold: 5 volumes: