Skip to content

Commit

Permalink
OPNET-629: Mark haproxy unhealthy if no healthy backends
Browse files Browse the repository at this point in the history
Previously we avoided doing this because of potential issues in
unhealthy clusters where backends were flapping and we didn't want
to trigger failovers. However, given the nature of the firewall rule
monitor check that approach was not effective anyway and allowing
HAProxy to report its own status to the monitor is much more robust
than relying on API calls being routed correctly when API rollouts
are happening.

This is being implemented as a separate monitor endpoint because we
don't want the Kubelet liveness probes to fail just because there
are no backends (which is an expected state in early cluster
deployment). That would trigger unnecessary crash loops.
  • Loading branch information
cybertron committed Dec 18, 2024
1 parent c761b7c commit e7cca24
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions templates/master/00-master/on-prem/files/haproxy-haproxy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ contents:
mode http
monitor-uri /haproxy_ready
option dontlognull
listen monitor_check_http_url
bind :::9454 v4v6
mode http
monitor-uri /haproxy_monitor
monitor fail if { nbsrv(masters) lt 1 }
option dontlognull
{{`{{- end }}`}}
listen stats
bind localhost:{{`{{ .LBConfig.StatPort }}`}}
Expand Down

0 comments on commit e7cca24

Please sign in to comment.