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
{{ message }}
This repository has been archived by the owner on Sep 14, 2020. It is now read-only.
It would be convenient, if all the important log messages are automatically sent to K8s events, same as they are logged to stdout/stderr.
Only the important messages, not the debug messages.
Both Kopf-internal messages (already sent to k8s now), and the operator-produced messages (as logged via the per-object logger kwarg).
There should be a way to opt out at least on a per-message level — i.e. to explicitly say to not send it as a k8s-event, but to keep it as a log message only (except as logging it as a debug-message).
importkopf@kopf.on.create('zalando.org', 'v1', 'kopfexamples')defcreate_fn(spec, logger, **kwargs):
image=spec.get('image')
ifnotimage.startswith('trusted.repo.com/'):
logger.warning("Only images from trusted.repo.com are trusted. ""Got potentially insecure image %r", image)
This will hide Kopf's explicit k8s-event-sending routines — as it goes against Kopf's mission (of not being a K8s client library). But this will integrate Python logging machinery into K8s's logging/eventing subsystem — which perfectly fits into Kopf's mission of bringing Pythonic ways of coding to the K8s operators field.
The text was updated successfully, but these errors were encountered:
It would be convenient, if all the important log messages are automatically sent to K8s events, same as they are logged to stdout/stderr.
Only the important messages, not the debug messages.
Both Kopf-internal messages (already sent to k8s now), and the operator-produced messages (as logged via the per-object
logger
kwarg).There should be a way to opt out at least on a per-message level — i.e. to explicitly say to not send it as a k8s-event, but to keep it as a log message only (except as logging it as a debug-message).
This will hide Kopf's explicit k8s-event-sending routines — as it goes against Kopf's mission (of not being a K8s client library). But this will integrate Python
logging
machinery into K8s's logging/eventing subsystem — which perfectly fits into Kopf's mission of bringing Pythonic ways of coding to the K8s operators field.The text was updated successfully, but these errors were encountered: