Remove initial log error during reconfiguration

This commit is contained in:
Manuel Alejandro de Brito Fontes 2018-11-20 15:19:20 -03:00
parent 96f5ae6668
commit 5d4dc78926
No known key found for this signature in database
GPG key ID: 786136016A8BA02A

View file

@ -193,6 +193,16 @@ func (n *NGINXController) syncIngress(interface{}) error {
n.metricCollector.SetSSLExpireTime(servers)
}
isFirstSync := n.runningConfig.Equal(&ingress.Configuration{})
if isFirstSync {
// For the initial sync it always takes some time for NGINX to
// start listening on the configured port (default 18080)
// For large configurations it might take a while so we loop
// and back off
glog.Info("Initial sync, sleeping for 1 second.")
time.Sleep(1 * time.Second)
}
retry := wait.Backoff{
Steps: 15,
Duration: 1 * time.Second,