dotnet-operator-sdk
dotnet-operator-sdk copied to clipboard
[bug]: Watcher stops watching custom resource after some time
Describe the bug
I am deploying a pretty basic operator into our k8s cluster (v1.28.5) and after a while (around 1 hour) we receive this event in our log:
{"Timestamp":"2024-05-17 13:11:04Z","EventId":0,"LogLevel":"Debug","Category":"KubeOps.Operator.Watcher.LeaderAwareResourceWatcher","Message":"The watcher received a known error from the watched resource \u0022V1TestEntity\u0022. This indicates that there are no instances of this resource.","State":{"Message":"The watcher received a known error from the watched resource \u0022V1TestEntity\u0022. This indicates that there are no instances of this resource.","resource":"V1TestEntity","{OriginalFormat}":"The watcher received a known error from the watched resource \u0022{resource}\u0022. This indicates that there are no instances of this resource."}}
When deploying a custom resource after this message appears, the ReconcileAsync message doesnt get called an no further log messages are written.
To reproduce
- Write basic Operator with v9.1.0
- Deploy Operator to k8s 1.28.5
- Do not deploy any instances of the custom resource
- Wait >1 hour
- Deploy an instance of the CR
- Operator does not fire
Expected behavior
The Operator should reconcile CRs even after some time has passed and even if there are no instances of CRs for a while
Screenshots
No response