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:
message (
str
)generation (
int
)reason (
StatusReason
)timestamp (
datetime
, default:<factory>
)
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: