Remove redundant health check to avoid liveness or readiness timeout

This commit is contained in:
agile6v 2020-07-01 10:53:31 +08:00
parent ff60aa9e2b
commit 38447408e1

View file

@ -61,16 +61,7 @@ func (n *NGINXController) Check(_ *http.Request) error {
return errors.Wrapf(err, "checking for NGINX process with PID %v", pid)
}
statusCode, _, err := nginx.NewGetStatusRequest(nginx.HealthPath)
if err != nil {
return errors.Wrapf(err, "checking if NGINX is running")
}
if statusCode != 200 {
return fmt.Errorf("ingress controller is not healthy (%v)", statusCode)
}
statusCode, _, err = nginx.NewGetStatusRequest("/is-dynamic-lb-initialized")
statusCode, _, err := nginx.NewGetStatusRequest("/is-dynamic-lb-initialized")
if err != nil {
return errors.Wrapf(err, "checking if the dynamic load balancer started")
}