Skip to content

Commit

Permalink
helm: Probe Envoy DaemonSet localhost IP directly
Browse files Browse the repository at this point in the history
[ upstream commit 29a7918 ]

On IPv6-only clusters, querying localhost for the health check could attempt to check 127.0.0.1, presumable depending on host DNS configuration.

As the health check does not listen on IPv4 when .Values.ipv4.enabled is false, this health check could fail.

This patch uses the same logic as the bootstrap-config.json file to ensure a valid IP is always used for the health check.

Fixes: #30968
Fixes: 859d2a9 ("helm: use /ready from Envoy admin iface for healthprobes on daemonset")

Signed-off-by: Andrew Titmuss <iandrewt@icloud.com>
  • Loading branch information
iandrewt authored and YutaroHayakawa committed Feb 29, 2024
1 parent c2961d8 commit ba39222
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ spec:
{{- if semverCompare ">=1.20-0" .Capabilities.KubeVersion.Version }}
startupProbe:
httpGet:
host: "localhost"
host: {{ .Values.ipv4.enabled | ternary "127.0.0.1" "::1" | quote }}
path: /healthz
port: {{ .Values.envoy.healthPort }}
scheme: HTTP
Expand All @@ -92,7 +92,7 @@ spec:
{{- end }}
livenessProbe:
httpGet:
host: "localhost"
host: {{ .Values.ipv4.enabled | ternary "127.0.0.1" "::1" | quote }}
path: /healthz
port: {{ .Values.envoy.healthPort }}
scheme: HTTP
Expand All @@ -110,7 +110,7 @@ spec:
timeoutSeconds: 5
readinessProbe:
httpGet:
host: "localhost"
host: {{ .Values.ipv4.enabled | ternary "127.0.0.1" "::1" | quote }}
path: /healthz
port: {{ .Values.envoy.healthPort }}
scheme: HTTP
Expand Down

0 comments on commit ba39222

Please sign in to comment.