Skip to content

Commit

Permalink
fix: add a guard to ensure only ingresses that are handled have their…
Browse files Browse the repository at this point in the history
… status updated. (#26)
  • Loading branch information
Justin Bertrand authored Jul 22, 2022
1 parent ae0e9ee commit 0bb13c2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,13 @@ func (c *Controller) syncHandler(key string) error {
return err
}

// Handle the Ingress status
_, err = c.handleIngressStatus(ingress, vs)
if err != nil {
klog.Errorf("failed to handle Ingress status: %v", err)
return err
// If the Ingress was handled, update its status.
if vs != nil {
_, err = c.handleIngressStatus(ingress, vs)
if err != nil {
klog.Errorf("failed to handle Ingress status: %v", err)
return err
}
}

return nil
Expand Down

0 comments on commit 0bb13c2

Please sign in to comment.