This repository has been archived by the owner on Sep 14, 2020. It is now read-only.
Handler for starting the per-object background threads/coroutines #60
Labels
enhancement
New feature or request
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: