Instrument controller to show failed configuration reload and the last time it was succeeded

This commit is contained in:
Giancarlo Rubio 2018-05-18 20:27:32 +02:00
parent b7640cc598
commit 14bca24202
2 changed files with 43 additions and 6 deletions

View file

@ -169,13 +169,15 @@ func (n *NGINXController) syncIngress(interface{}) error {
err := n.OnUpdate(pcfg)
if err != nil {
incReloadErrorCount()
IncReloadErrorCount()
ConfigSuccess(false)
glog.Errorf("unexpected failure restarting the backend: \n%v", err)
return err
}
glog.Infof("ingress backend successfully reloaded...")
incReloadCount()
ConfigSuccess(true)
IncReloadCount()
setSSLExpireTime(servers)
}