Regarding OperatorSettings WatcherHttpTimeout #464
Replies: 1 comment
-
The problem is that Kubernetes terminates the watcher connection at some point. You actually need some kind of timeout. Right now, the caching mechanism is internal, but you could implement some kind of cache that checks, if the object was created/updated or not. But: be aware that at the start of the operator all objects are "created". That is the main reason why we moved to "reconcile" instaed of "created / updated". You never know when Kubernetes sends those events and what the reason for the state change is. You should rather use the desired state (aka the yaml) and the current state (aka what is running in Kubernetes) to diff and adjust the objects accordingly. |
Beta Was this translation helpful? Give feedback.
-
What I have understood is the default value is set to 60. And every 60 mt reconcile is invoked.
In our current requirement we just want that our reconcile is invoked on Create/Update of CRD. What will be the right way to achieve that? In my initial testing, I have set the timeout to 0 and it is kind of showing the right behavior and getting invoked on Create/Update only and not every 60 sec.
Do you see any issues with the same or what is the right way to handle this scenario?
Beta Was this translation helpful? Give feedback.
All reactions