emberstack / kubernetes-reflector

Custom Kubernetes controller that can be used to replicate secrets, configmaps and certificates.
MIT License
1.11k stars 96 forks source link

No retry after failure #465

Open kralikba opened 1 month ago

kralikba commented 1 month ago

Hi,

I have occasionally encountered a situation where Reflector failed with an unexpected Kubernetes API Server error regarding creating a secret, but even after the reason has been cleared, the secret was still not created.

I think the cause is that if ResourceMirror.ResourceReflect fails, it catches the exception, logs it, then returns successfully:

https://github.com/emberstack/kubernetes-reflector/blob/a9571d3301395d6b2d6fa25afc945eb5c0d46c1b/src/ES.Kubernetes.Reflector/Core/Mirroring/ResourceMirror.cs#L487