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 '*'.
This commit is contained in:
2026-08-27 20:56:16 +02:00
parent cfd9317086
commit f67cbf4465
@@ -50,6 +50,10 @@ spec:
httpGet: httpGet:
path: /login/ path: /login/
port: 8080 port: 8080
# Django rejects the pod IP as a Host header (ALLOWED_HOSTS).
httpHeaders:
- name: Host
value: netbox.jsme.be
periodSeconds: 10 periodSeconds: 10
# Generous: the entrypoint runs migrations before granian binds. # Generous: the entrypoint runs migrations before granian binds.
failureThreshold: 60 failureThreshold: 60
@@ -57,11 +61,19 @@ spec:
httpGet: httpGet:
path: /login/ path: /login/
port: 8080 port: 8080
# Django rejects the pod IP as a Host header (ALLOWED_HOSTS).
httpHeaders:
- name: Host
value: netbox.jsme.be
periodSeconds: 15 periodSeconds: 15
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /login/ path: /login/
port: 8080 port: 8080
# Django rejects the pod IP as a Host header (ALLOWED_HOSTS).
httpHeaders:
- name: Host
value: netbox.jsme.be
periodSeconds: 30 periodSeconds: 30
failureThreshold: 5 failureThreshold: 5
volumes: volumes: