...
1 package v1
2
3 import (
4 corev1 "k8s.io/api/core/v1"
5 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
6 )
7
8
9
10
11 type Condition struct {
12 Type ConditionType `json:"type" description:"type of condition ie. Available|Progressing|Degraded."`
13
14 Status corev1.ConditionStatus `json:"status" description:"status of the condition, one of True, False, Unknown"`
15
16
17 Reason string `json:"reason,omitempty" description:"one-word CamelCase reason for the condition's last transition"`
18
19
20 Message string `json:"message,omitempty" description:"human-readable message indicating details about last transition"`
21
22
23 LastHeartbeatTime metav1.Time `json:"lastHeartbeatTime" description:"last time we got an update on a given condition"`
24
25
26 LastTransitionTime metav1.Time `json:"lastTransitionTime" description:"last time the condition transit from one status to another"`
27 }
28
29
30 type ConditionType string
31
32 const (
33
34
35 ConditionAvailable ConditionType = "Available"
36
37
38
39 ConditionProgressing ConditionType = "Progressing"
40
41
42
43
44 ConditionDegraded ConditionType = "Degraded"
45
46
47
48
49
50 ConditionUpgradeable ConditionType = "Upgradeable"
51 )
52
View as plain text