Closed tomasaschan closed 3 months ago
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
/remove-lifecycle stale
I've encountered this again recently, and have a mind on hacking on a better implementation here.
What happened:
I implemented a custom
declarative.Status
like this:When my controller reconciles with this, it logs
"preflight check failed, not reconciling"
with a stack trace that doesn't point to anywhere in my own code. That's annoying and a little confusing.What you expected to happen: reconciliation is requeued without any errors logged.
How to reproduce it (as minimally and precisely as possible):
Create a declarative controller with a status implementation like the above, reconcile an instance and observe logs.
Anything else we need to know?:
This seems related to, but is different from #232. I imagine if my status also had a
Reconcile
function, it would be confusing that it gets called even though the preflight check failed (signalled by returning a non-nil result, even if that result has a nilErr
). That, in turn, happens because this deferred function doesn't check for the preflight result. (It seems it once did check, but it's unclear to me why that was removed...)