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