fix(k8s/homepage): allow pod IP host for probes per upstream k8s docs
This commit is contained in:
@@ -33,8 +33,12 @@ spec:
|
|||||||
- secretRef:
|
- secretRef:
|
||||||
name: homepage-credentials
|
name: homepage-credentials
|
||||||
env:
|
env:
|
||||||
|
- name: MY_POD_IP
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: status.podIP
|
||||||
- name: HOMEPAGE_ALLOWED_HOSTS
|
- name: HOMEPAGE_ALLOWED_HOSTS
|
||||||
value: "${HOMEPAGE_HOST}"
|
value: "$(MY_POD_IP):3000,${HOMEPAGE_HOST}"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: config
|
- name: config
|
||||||
mountPath: /app/config/settings.yaml
|
mountPath: /app/config/settings.yaml
|
||||||
@@ -51,23 +55,16 @@ spec:
|
|||||||
- name: config
|
- name: config
|
||||||
mountPath: /app/config/kubernetes.yaml
|
mountPath: /app/config/kubernetes.yaml
|
||||||
subPath: kubernetes.yaml
|
subPath: kubernetes.yaml
|
||||||
# v2 validates the Host header on every route; kubelet sends the pod IP, so pin an always-allowed host
|
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
port: 3000
|
port: 3000
|
||||||
path: /api/healthcheck
|
path: /api/healthcheck
|
||||||
httpHeaders:
|
|
||||||
- name: Host
|
|
||||||
value: localhost:3000
|
|
||||||
initialDelaySeconds: 30
|
initialDelaySeconds: 30
|
||||||
periodSeconds: 30
|
periodSeconds: 30
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
port: 3000
|
port: 3000
|
||||||
path: /api/healthcheck
|
path: /api/healthcheck
|
||||||
httpHeaders:
|
|
||||||
- name: Host
|
|
||||||
value: localhost:3000
|
|
||||||
initialDelaySeconds: 10
|
initialDelaySeconds: 10
|
||||||
periodSeconds: 10
|
periodSeconds: 10
|
||||||
resources:
|
resources:
|
||||||
|
|||||||
Reference in New Issue
Block a user