kubelatte-ce

Форк
2
Форк от sbertech/kubelatte-ce
/
resource_status.go 
96 строк · 2.9 Кб
1
package v1alpha1
2

3
import (
4
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
5
)
6

7
type LogStatus string
8

9
const (
10
	SuccessStatus LogStatus = "Success"
11
	FailedStatus  LogStatus = "Failed"
12
)
13

14
type Phase string
15

16
const (
17
	Pending Phase = "Pending"
18
	Running Phase = "Running"
19
	Waiting Phase = "Waiting"
20
	Failed  Phase = "Failed"
21
	Unknown Phase = "Unknown"
22
)
23

24
type ConditionType string
25

26
const (
27
	UpdateConfigMap         ConditionType = "UpdateConfigMap"
28
	CheckAnnotationAndLabel ConditionType = "CheckAnnotationAndLabel"
29
	CorrectnessOfConfigs    ConditionType = "CorrectnessOfConfigs"
30
	LastHandledHash         ConditionType = "LastHandledHash"
31
)
32

33
type ConditionStatus string
34

35
const (
36
	ConditionTrue    ConditionStatus = "True"
37
	ConditionFalse   ConditionStatus = "False"
38
	ConditionUnknown ConditionStatus = "Unknown"
39
)
40

41
type Condition struct {
42
	Type               ConditionType   `json:"type" protobuf:"bytes,1,opt,name=type,casttype=ConditionType"`
43
	Status             ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=ConditionStatus"`
44
	LastTransitionTime metav1.Time     `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"`
45
	Message            string          `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"`
46
}
47

48
type SearchStatus string
49

50
const (
51
	Found    SearchStatus = "Found"
52
	NotFound SearchStatus = "Not Found"
53
)
54

55
type Annotation struct {
56
	Name           string   `json:"name,omitempty" protobuf:"bytes,1,opt,name=type"`
57
	Containers     []string `json:"containers,omitempty"`
58
	InitContainers []string `json:"initContainers,omitempty"`
59
}
60

61
type Label struct {
62
	Name           []string `json:"name,omitempty" protobuf:"bytes,1,opt,name=type"`
63
	Containers     []string `json:"containers,omitempty"`
64
	InitContainers []string `json:"initContainers,omitempty"`
65
}
66

67
type ContainerInfo struct {
68
	Name   string       `json:"name" protobuf:"bytes,1,opt,name=type"`
69
	Status SearchStatus `json:"status" protobuf:"bytes,2,opt,name=status,casttype=SearchStatus"`
70
}
71

72
type LabelAndAnnotationNotFound struct {
73
	Containers     []string `json:"containers,omitempty"`
74
	InitContainers []string `json:"initContainers,omitempty"`
75
}
76

77
type LabelAndAnnotationInfo struct {
78
	LabelAndAnnotationNotFound LabelAndAnnotationNotFound `json:"labelAndAnnotationNotFound,omitempty"`
79
	Annotations                []Annotation               `json:"annotations,omitempty"`
80
	Labels                     []Label                    `json:"labels,omitempty"`
81
}
82

83
// +kubebuilder:pruning:PreserveUnknownFields
84
type ResourceStatus struct {
85
	Name       string `json:"name,omitempty"`
86
	Kind       string `json:"kind,omitempty"`
87
	ApiVersion string `json:"apiVersion,omitempty"`
88
	Message    string `json:"message,omitempty"`
89
	Phase      string `json:"phase,omitempty"`
90
	Status     string `json:"status,omitempty"`
91
}
92

93
// +kubebuilder:object:generate=false
94
type Namespaced interface {
95
	GetNamespacedName() string
96
}
97

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.