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

Unable to specify SoftError for webhook providers #4479

Closed
krasoffski opened this issue May 17, 2024 · 3 comments
Closed

Unable to specify SoftError for webhook providers #4479

krasoffski opened this issue May 17, 2024 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@krasoffski
Copy link

krasoffski commented May 17, 2024

What happened:
Following PR #4166 introduced behavior when any not soft error leads to external-dns exit.

As a result, when webhook provider returns any error or non http.OK (code 200) external DNS restarts.
Here is example from code:
https://github.com/kubernetes-sigs/external-dns/blob/v0.14.1/provider/webhook/webhook.go#L181

Previous behavior was only log error and try next iteration.
This leads to problem with usage of buil-in webhook server and adding workaround for webhook provider which always returns 200 despite the errors to avoid external-dns retarts and possible crash loop.

What you expected to happen:
I expect that webhook provider errors is counted as soft errors or there is ability to distinguish (configure) fatal errors or soft errors will be returned by web-hook provider. Or configuration parameter which switchers web-hook errors as soft only errors.

How to reproduce it (as minimally and precisely as possible):
Just create webhook provider from examples which returns not 200 response in some cases. External-dns exits with error.

Environment:

  • External-DNS version (use external-dns --version): v0.14.1
  • DNS provider: from examples.
@krasoffski krasoffski added the kind/bug Categorizes issue or PR as related to a bug. label May 17, 2024
@SimonKienzler
Copy link
Contributor

Does #4319 address your issue? It returns SoftErrors for 5xx errors on the webhook provider side. As far as I understand, 4xx errors are considered to be a problem on ExternalDNS's side, so no retry should be attempted. v0.14.2 contains the change.

@krasoffski
Copy link
Author

krasoffski commented Jul 4, 2024

@SimonKienzler
Thank you. I will check and come back with answer (close the issue or add more details).

@krasoffski
Copy link
Author

Looks like what we need for web hook providers. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants