Add verification of lua load balancer to health check (#2308)
This commit is contained in:
parent
888b74b336
commit
1c65320618
3 changed files with 34 additions and 1 deletions
File diff suppressed because one or more lines are too long
|
|
@ -42,6 +42,17 @@ func (n *NGINXController) Check(_ *http.Request) error {
|
|||
return fmt.Errorf("ingress controller is not healthy")
|
||||
}
|
||||
|
||||
if n.cfg.DynamicConfigurationEnabled {
|
||||
res, err := http.Get(fmt.Sprintf("http://0.0.0.0:%v/is-dynamic-lb-initialized", n.cfg.ListenPorts.Status))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer res.Body.Close()
|
||||
if res.StatusCode != 200 {
|
||||
return fmt.Errorf("dynamic load balancer not started")
|
||||
}
|
||||
}
|
||||
|
||||
// check the nginx master process is running
|
||||
fs, err := proc.NewFS("/proc")
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue