You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some case, it is desired to have a background thread or async coroutine for every object existing in the cluster (if the operator developer decides so).
Example use-case: polling the external services & APIs when the custom resource represents the jobs of an external system with its status field.
It can be done from the @kopf.on.create() handler. However, when the operator restarts, and there are no events on the object, no handler will ever be called, meaning the operator will not react to the external state changes.
Other names: @kopf.on.regain(), @kopf.on.restore().
UNDECIDED:
Option A:
The handler must be called only in the case when the operator restarts, gets a fresh list of the objects as part of the watch request, and notices there are some object already handled.
It must NOT be called when:
When the object is actually created while the operator is running ("first seen" or "create" causes).
When the operator starts and gets a fresh list of the objects as part of the watch request, and the objects are new and the @kopf.on.create handler should be called.
Options B:
When the object is fully handled (including the creation), and now needs the monitoring — both in cases of creation, and the operator restart.
The text was updated successfully, but these errors were encountered:
In some case, it is desired to have a background thread or async coroutine for every object existing in the cluster (if the operator developer decides so).
Example use-case: polling the external services & APIs when the custom resource represents the jobs of an external system with its
status
field.It can be done from the
@kopf.on.create()
handler. However, when the operator restarts, and there are no events on the object, no handler will ever be called, meaning the operator will not react to the external state changes.With this handler, the problem can be solved:
Other names:
@kopf.on.regain()
,@kopf.on.restore()
.UNDECIDED:
Option A:
The handler must be called only in the case when the operator restarts, gets a fresh list of the objects as part of the watch request, and notices there are some object already handled.
It must NOT be called when:
@kopf.on.create
handler should be called.Options B:
The text was updated successfully, but these errors were encountered: