KubernetesResourceStatus#
- class gafaelfawr.models.kubernetes.KubernetesResourceStatus(message, generation, reason, timestamp=<factory>)#
Bases:
objectRepresents 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
statusfield of the GafaelfawrServiceToken object.- Parameters:
message (
str)generation (
int)reason (
StatusReason)timestamp (
TypeAliasType, default:<factory>)
Attributes Summary
Generation of the resource that was processed.
Message associated with the transition.
Reason for the status update.
Time of the status event.
Methods Summary
failure(resource, message)Create a status object for a failure.
to_dict()Convert the status update to a dictionary for Kubernetes.
Attributes Documentation
-
generation:
int= <dataclasses._MISSING_TYPE object># Generation of the resource that was processed.
-
reason:
StatusReason= <dataclasses._MISSING_TYPE object># Reason for the status update.
-
timestamp:
TypeAliasType= <dataclasses._MISSING_TYPE object># Time of the status event.
Methods Documentation
- classmethod failure(resource, message)#
Create a status object for a failure.
- Parameters:
service_token – Object being processed.
message (
str) – Error message for the failure.resource (
KubernetesResource)
- Returns:
Corresponding status object.
- Return type: