Summary
The meta package in K8S apimachinery exposes a Condition struct which enriches status fields with information such as transitionTime, different fine-granular condition types and reasons why this condition has been set.
The controller-utils package offers utility functions around conditions.
Basic example
// either introduce our own condition type or leverage the apimachinery condition type
type ConditionWithTimestamps struct {
Type string
Status corev1.ConditionStatus
LastUpdateTime *metav1.Time
LastTransitionTime *metav1.Time
Reason string
Message string
}
type MachineStatus struct {
...
Conditions []ConditionWithTimestamps
}
Naming is up for suggestions.
The potential resources ConditionsAPI to be integrated to
Motivation
The IronCore API should start actively leveraging this feature to enhance operational observability of API resources.
Summary
The meta package in K8S apimachinery exposes a
Conditionstruct which enriches status fields with information such astransitionTime, different fine-granular condition types and reasons why this condition has been set.The controller-utils package offers utility functions around conditions.
Basic example
Naming is up for suggestions.
The potential resources ConditionsAPI to be integrated to
Motivation
The IronCore API should start actively leveraging this feature to enhance operational observability of API resources.