Skip to content

Commit

Permalink
Switch to /readyz for haproxy healthchecking
Browse files Browse the repository at this point in the history
Per [0], the /readyz endpoint is how the api communicates that it
is gracefully shutting down. Once /readyz starts to report failure,
we want to stop sending traffic to that backend. If we wait for
/healthz, it may be too late because once /healthz starts failing
the api is already not accepting connections.

0: openshift/installer#3537
  • Loading branch information
cybertron committed May 11, 2020
1 parent f5e6d6b commit e6f9267
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func IsKubernetesHealthy(port uint16) (bool, error) {
TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
}
client := &http.Client{Transport: transport}
resp, err := client.Get(fmt.Sprintf("https://127.0.0.1:%d/healthz", port))
resp, err := client.Get(fmt.Sprintf("https://127.0.0.1:%d/readyz", port))
if err != nil {
return false, err
}
Expand Down

0 comments on commit e6f9267

Please sign in to comment.