You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by to...@apache.org on 2021/05/09 02:25:14 UTC
[apisix-ingress-controller] branch master updated: chore: add error
logging in ingress (#428)
This is an automated email from the ASF dual-hosted git repository.
tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git
The following commit(s) were added to refs/heads/master by this push:
new dc43be8 chore: add error logging in ingress (#428)
dc43be8 is described below
commit dc43be89879d09dabb13626a191af72418ca730e
Author: Alex Zhang <zc...@gmail.com>
AuthorDate: Sun May 9 10:25:03 2021 +0800
chore: add error logging in ingress (#428)
---
pkg/ingress/ingress.go | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/pkg/ingress/ingress.go b/pkg/ingress/ingress.go
index 9e2e7a1..8183981 100644
--- a/pkg/ingress/ingress.go
+++ b/pkg/ingress/ingress.go
@@ -172,7 +172,13 @@ func (c *ingressController) sync(ctx context.Context, ev *types.Event) error {
}
added, updated, deleted = m.diff(om)
}
- return c.controller.syncManifests(ctx, added, updated, deleted)
+ if err := c.controller.syncManifests(ctx, added, updated, deleted); err != nil {
+ log.Errorw("failed to sync ingress artifacts",
+ zap.Error(err),
+ )
+ return err
+ }
+ return nil
}
func (c *ingressController) handleSyncErr(obj interface{}, err error) {
@@ -201,11 +207,11 @@ func (c *ingressController) onAdd(obj interface{}) {
valid := c.isIngressEffective(ing)
if valid {
log.Debugw("ingress add event arrived",
- zap.Any("object", obj),
+ zap.Any("object", ing),
)
} else {
log.Debugw("ignore noneffective ingress add event",
- zap.Any("object", obj),
+ zap.Any("object", ing),
)
return
}