Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retry should readd to queue #2348

Open
donyhuang opened this issue Jan 20, 2025 · 0 comments
Open

retry should readd to queue #2348

donyhuang opened this issue Jan 20, 2025 · 0 comments

Comments

@donyhuang
Copy link

donyhuang commented Jan 20, 2025

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")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant