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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user