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
Hello, I try to build an own operator that creates few simple resources by some CRD, those need to be updated by some external data. I check for that data periodically, using timer/daemon.
My handlers.py is deadly simple - I just copied example from kopf website:
importkopfimportlogging@kopf.on.create('ephemeralvolumeclaims')defcreate_fn(body, **kwargs):
logging.info(f"A handler is called with body: {body}")
@kopf.timer('ephemeralvolumeclaims', interval=1.0)defping_kex(spec, **kwargs):
logging.info(f"A timer is called")
When I run this file without timer or daemon, everything works like a charm, but once I add timer/daemon, my on* handlers stopped working without any information.
What can be wrong with this configuration? What is the best approach to have some periodic watch for some external system to provide my k8s resources with some information from that system?
UPD: I use macOS and run kopf directly from macos as kopf run ...
The text was updated successfully, but these errors were encountered:
Keywords
timer, daeemon, handler
Problem
Hello, I try to build an own operator that creates few simple resources by some CRD, those need to be updated by some external data. I check for that data periodically, using timer/daemon.
My handlers.py is deadly simple - I just copied example from kopf website:
CRD
Object
When I run this file without timer or daemon, everything works like a charm, but once I add timer/daemon, my on* handlers stopped working without any information.
What can be wrong with this configuration? What is the best approach to have some periodic watch for some external system to provide my k8s resources with some information from that system?
UPD: I use macOS and run kopf directly from macos as
kopf run ...
The text was updated successfully, but these errors were encountered: