From 5d4dc789264ec44da861a0d5d3a5fdd7fdfd4d23 Mon Sep 17 00:00:00 2001 From: Manuel Alejandro de Brito Fontes Date: Tue, 20 Nov 2018 15:19:20 -0300 Subject: [PATCH] Remove initial log error during reconfiguration --- internal/ingress/controller/controller.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/internal/ingress/controller/controller.go b/internal/ingress/controller/controller.go index d3ea7dd07..d0108c7ea 100644 --- a/internal/ingress/controller/controller.go +++ b/internal/ingress/controller/controller.go @@ -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,