stackitcloud / external-dns-stackit-webhook

External-DNS Webhook Provider to manage STACKIT DNS Records
https://www.stackit.de
Apache License 2.0
13 stars 4 forks source link

Do not return a 500 error when dns zone does not exist. #16

Closed busilina closed 7 months ago

busilina commented 7 months ago

Is your feature request related to a problem? Please describe.

If for some reason the dns zone does not exist (anymore), the webhook returns InternalServerError . This causes the external-dns pod to come in a CrashLoop.

Describe the solution you'd like

I think it would be better to just give a (maybe a warn) log. E.g., dns zone missing and just continue without an error.

Describe alternatives you've considered

As an alternative maybe it's more appropriate to return a NotFound error (I am not sure if the external-dns would still crash since this is an error as well).

Search

Code of Conduct

Additional context

I'm not sure if this is a requirement from the external-dns itself, but I feel that this is a very hard error handling. And I would like to discuss this with you. Thanks for your effort!

PatrickKoss commented 7 months ago

I think we talked in person about it and come to conclusion we should adjust external dns for graceful error handling. If there are is still a problem, feel free to open the issue again.

busilina commented 7 months ago

Yes, we already have opened a PR in external-ds to handle this. This would solve our problem once merged. Thanks for the discussion.