periodic

async gafaelfawr.operator.tokens.periodic(name, namespace, body, memo, **_)

Periodically re-check all GafaelfawrServiceToken objects.

Parameters:
  • name (str | None) – Name of the object.

  • namespace (str | None) – Namespace of the object.

  • body (Body) – Body of the object in dictionary form.

  • memo (Memo) – Holds global state, used to store the KubernetesTokenService object.

Returns:

Status information to record in the object, or None if no changes were made.

Return type:

dict or None

Notes

The callbacks for timers have different signatures than the callbacks for event handlers, so this unfortunately has to be a separate function and thus will record separate status information than the create function. Kopf determines the key into which to store status information from the name of the handler function and there is apparently no way to override this.

This uses idle and initial_delay settings to try to avoid conflicting with the create and update handlers on startup if changes had happened while the operator was down, without interfering too much with the test suite.

Parameters:

_ (Any)