github.com/codeready-toolchain/api@v0.0.0-20240507023248-73662d6db2c5/api/v1alpha1/conditions.go (about) 1 package v1alpha1 2 3 import ( 4 corev1 "k8s.io/api/core/v1" 5 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" 6 ) 7 8 // NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized. 9 10 type ConditionType string 11 12 const ( 13 // ConditionReady specifies that the resource is ready 14 ConditionReady ConditionType = "Ready" 15 16 // Status reasons 17 provisioningReason = "Provisioning" 18 provisionedReason = "Provisioned" 19 disabledReason = "Disabled" 20 terminatingReason = "Terminating" 21 terminatingFailedReason = "UnableToTerminate" 22 updatingReason = "Updating" 23 24 // Condition types 25 deletionError = "DeletionError" 26 ) 27 28 type Condition struct { 29 // Type of condition 30 Type ConditionType `json:"type"` 31 // Status of the condition, one of True, False, Unknown. 32 Status corev1.ConditionStatus `json:"status"` 33 // Last time the condition transit from one status to another. 34 // +optional 35 LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` 36 // (brief) reason for the condition's last transition. 37 // +optional 38 Reason string `json:"reason,omitempty"` 39 // Human readable message indicating details about last transition. 40 // +optional 41 Message string `json:"message,omitempty"` 42 // Last time the condition was updated 43 // +optional 44 LastUpdatedTime *metav1.Time `json:"lastUpdatedTime,omitempty"` 45 }