Skip to content

Commit

Permalink
Do not log startUpdate/endUpdate for non LoadBalancer services
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne Champetier <echampetier@anevia.com>
  • Loading branch information
champtar authored and russellb committed Mar 26, 2021
1 parent 9ad25a9 commit de85dc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions speaker/main.go
Expand Up @@ -199,13 +199,13 @@ func (c *controller) SetBalancer(l gokitlog.Logger, name string, svc *v1.Service
return c.deleteBalancer(l, name, "serviceDeleted")
}

l.Log("event", "startUpdate", "msg", "start of service update")
defer l.Log("event", "endUpdate", "msg", "end of service update")

if svc.Spec.Type != "LoadBalancer" {
return c.deleteBalancer(l, name, "notLoadBalancer")
}

l.Log("event", "startUpdate", "msg", "start of service update")
defer l.Log("event", "endUpdate", "msg", "end of service update")

if c.config == nil {
l.Log("event", "noConfig", "msg", "not processing, still waiting for config")
return k8s.SyncStateSuccess
Expand Down

0 comments on commit de85dc6

Please sign in to comment.