4 corev1 "k8s.io/api/core/v1"
5 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
8 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
10 // ResourceBundleState is the Schema for the ResourceBundleStatees API
11 // +k8s:openapi-gen=true
12 // +kubebuilder:subresource:status
14 type ResourceBundleState struct {
15 metav1.TypeMeta `json:",inline"`
16 metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
18 Spec ResourceBundleStateSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`
19 Status ResourceBundleStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
22 // ResourceBundleStateSpec defines the desired state of ResourceBundleState
23 // +k8s:openapi-gen=true
24 type ResourceBundleStateSpec struct {
25 Selector *metav1.LabelSelector `json:"selector" protobuf:"bytes,1,opt,name=selector"`
28 // ResourceBundleStatus defines the observed state of ResourceBundleState
29 // +k8s:openapi-gen=true
30 type ResourceBundleStatus struct {
31 Ready bool `json:"ready" protobuf:"varint,1,opt,name=ready"`
32 ResourceCount int32 `json:"resourceCount" protobuf:"varint,2,opt,name=resourceCount"`
33 PodStatuses []PodStatus `json:"podStatuses" protobuf:"varint,3,opt,name=podStatuses"`
34 ServiceStatuses []corev1.Service `json:"serviceStatuses" protobuf:"varint,4,opt,name=serviceStatuses"`
37 // PodStatus defines the observed state of ResourceBundleState
38 // +k8s:openapi-gen=true
39 type PodStatus struct {
40 metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
41 Ready bool `json:"ready" protobuf:"varint,2,opt,name=ready"`
42 Status corev1.PodStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
45 // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
47 // ResourceBundleStateList contains a list of ResourceBundleState
48 type ResourceBundleStateList struct {
49 metav1.TypeMeta `json:",inline"`
50 metav1.ListMeta `json:"metadata,omitempty"`
51 Items []ResourceBundleState `json:"items"`
55 SchemeBuilder.Register(&ResourceBundleState{}, &ResourceBundleStateList{})