bug: when ApisixPluginConfig resource update fails, it will not be retried
https://github.com/apache/apisix-ingress-controller/blob/4b089a3e06af9dd451628c2e41d9ae537101f9ce/pkg/providers/apisix/apisix_plugin_config.go#L287
func (c *apisixPluginConfigController) handleSyncErr(obj interface{}, errOrigin error) {
if errOrigin == nil {
c.workqueue.Forget(obj)
c.MetricsCollector.IncrSyncOperation("PluginConfig", "success")
return
}
ev := obj.(*types.Event)
if k8serrors.IsNotFound(errOrigin) && ev.Type != types.EventDelete {
log.Infow("sync ApisixPluginConfig but not found, ignore",
zap.String("event_type", ev.Type.String()),
zap.String("ApisixPluginConfig", ev.Object.(kube.ApisixPluginConfigEvent).Key),
)
c.workqueue.Forget(obj)
return
}
log.Warnw("sync ApisixPluginConfig failed, will retry",
zap.Any("object", obj),
zap.Error(errOrigin),
)
c.workqueue.Forget(obj) //is bug should replace with c.workqueue.AddRateLimited(obj)
c.MetricsCollector.IncrSyncOperation("PluginConfig", "failure")
}
This issue has been marked as stale due to 90 days of inactivity. It will be closed in 30 days if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the [email protected] list. Thank you for your contributions.
Rather than make a new ticket I'll reply here because I have a similar issue. On plugin errors sync does not retry, this is a problem with secrets in plugins when using ExternalSecrets where a secret is not ready yet the sync fails and doesn't retry, I have to forcibly annotate the Route to have it resync, auto-retry on error would be useful with some back-off strategy.
Hi @micahnz @donyhuang, the new v2.0.0 version has refactored this part and solved this problem. Please use the latest version for testing. If you still have problems, please reopen this issue.