crate.operator.utils.crate.on module¶
- crate.operator.utils.crate.on.error(*, error_handler)¶
The
@crate.on.error()
decorator for kopf handlers or StateBasedSubHandler. It catches permanent errors in handlers and runs a given coroutine. It re-raises the exception for further processing by kopf.
- async crate.operator.utils.crate.on.send_create_failed_notification(*args, **kwargs)¶
- async crate.operator.utils.crate.on.send_feedback_notification(*, namespace, name, message, operation, status, logger, action=WebhookAction.UNKNOWN, **kwargs)¶
- Parameters
namespace (
str
) –name (
str
) –message (
str
) –operation (
WebhookOperation
) –status (
WebhookStatus
) –logger (
Logger
) –action (
WebhookAction
) –
- Return type
- async crate.operator.utils.crate.on.send_update_failed_notification(*args, **kwargs)¶
- crate.operator.utils.crate.on.timeout(*, timeout)¶
The
@crate.timeout()
decorator for kopf handlers or StateBasedSubHandler. It checks if the runtime passed as kwarg to all handlers exceeded the given timeout and raises a kopf.HandlerTimeoutError accordingly.