KubernetesResourceStatus

class gafaelfawr.models.kubernetes.KubernetesResourceStatus(message, generation, reason, timestamp=<factory>)

Bases: object

Represents the processing status of a Kubernetes resource.

This is returned as the result of the Kopf operator handlers for changes to a Kubernetes resource. Kopf will then put this information into the status field of the GafaelfawrServiceToken object.

Parameters:

Methods Summary

failure(resource, message)

Create a status object for a failure.

to_dict()

Convert the status update to a dictionary for Kubernetes.

Methods Documentation

classmethod failure(resource, message)

Create a status object for a failure.

Parameters:
  • service_token – The object being processed.

  • message (str) – The error message for the failure.

  • resource (KubernetesResource)

Returns:

The corresponding status object.

Return type:

KubernetesResourceStatus

to_dict()

Convert the status update to a dictionary for Kubernetes.

Returns:

Information to store in the status field of the Kubernetes resource.

Return type:

dict