Merge pull request #3443 from aledbf/initial-reload

Remove initial log error during reconfiguration
This commit is contained in:
k8s-ci-robot 2018-11-21 05:44:54 -08:00 committed by GitHub
commit 003027b800
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -193,6 +193,16 @@ func (n *NGINXController) syncIngress(interface{}) error {
n.metricCollector.SetSSLExpireTime(servers) 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{ retry := wait.Backoff{
Steps: 15, Steps: 15,
Duration: 1 * time.Second, Duration: 1 * time.Second,