Skip to content

Commit c7d1106

Browse files
committed
Fix issue with error handling
In the syncHandler the code was changed to handle an error which was not required. This resulted in tunnels never being created. Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
1 parent 42b9f23 commit c7d1106

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

controller.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,10 @@ func (c *Controller) syncHandler(key string) error {
341341
}
342342

343343
service, err := c.serviceLister.Services(namespace).Get(name)
344-
if err != nil {
344+
// An error is expected when the tunnel is not found.
345+
// If we get a different error, it could be related to RBAC, so
346+
// in that case we should exit.
347+
if err != nil && !errors.IsNotFound(err) {
345348
return fmt.Errorf("error listing services: %s", err)
346349
}
347350

0 commit comments

Comments
 (0)