You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/09/06 14:48:25 UTC
[GitHub] [apisix-ingress-controller] jaysonsantos commented on issue #1322: bug: controller will erase status from ingress that uses another class
jaysonsantos commented on issue #1322:
URL: https://github.com/apache/apisix-ingress-controller/issues/1322#issuecomment-1238258089
i think a better approach would be this:
```diff
diff --git a/pkg/providers/ingress/ingress.go b/pkg/providers/ingress/ingress.go
index 689dd0b..e330352 100644
--- a/pkg/providers/ingress/ingress.go
+++ b/pkg/providers/ingress/ingress.go
@@ -230,6 +230,12 @@ func (c *ingressController) handleSyncErr(obj interface{}, err error) {
ing, errLocal = c.ingressLister.ExtensionsV1beta1(namespace, name)
}
+ if c.isIngressEffective(ing) {
+ log.Errorw("skipping unknown ingress class",
+ zap.Any("ingress", ing),
+ )
+ }
+
if err == nil {
// add status
if ev.Type != types.EventDelete {
```
but i am still not sure why the event arrived in the first place if `isIngressEffective` is always called before `c.workqueue.Add`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org