Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the v1alpha1 API group. +kubebuilder:object:generate=true +groupName=cozystack.io
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects. GroupVersion = schema.GroupVersion{Group: "cozystack.io", Version: "v1alpha1"} // SchemeBuilder is used to add go types to the GroupVersionKind scheme. SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Selector ¶
Selector specifies the label selector for workloads
func (Selector) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Selector.
func (Selector) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Workload ¶
type Workload struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Status WorkloadStatus `json:"status,omitempty"`
}
Workload is the Schema for the workloads API
func (*Workload) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Workload.
func (*Workload) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Workload) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkloadList ¶
type WorkloadList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Workload `json:"items"`
}
WorkloadList contains a list of Workload
func (*WorkloadList) DeepCopy ¶
func (in *WorkloadList) DeepCopy() *WorkloadList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadList.
func (*WorkloadList) DeepCopyInto ¶
func (in *WorkloadList) DeepCopyInto(out *WorkloadList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkloadList) DeepCopyObject ¶
func (in *WorkloadList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkloadMonitor ¶
type WorkloadMonitor struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec WorkloadMonitorSpec `json:"spec,omitempty"`
Status WorkloadMonitorStatus `json:"status,omitempty"`
}
WorkloadMonitor is the Schema for the workloadmonitors API
func (*WorkloadMonitor) DeepCopy ¶
func (in *WorkloadMonitor) DeepCopy() *WorkloadMonitor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadMonitor.
func (*WorkloadMonitor) DeepCopyInto ¶
func (in *WorkloadMonitor) DeepCopyInto(out *WorkloadMonitor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkloadMonitor) DeepCopyObject ¶
func (in *WorkloadMonitor) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*WorkloadMonitor) GetSelector ¶
func (w *WorkloadMonitor) GetSelector() map[string]string
GetSelector returns the label selector from metadata
type WorkloadMonitorList ¶
type WorkloadMonitorList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []WorkloadMonitor `json:"items"`
}
WorkloadMonitorList contains a list of WorkloadMonitor
func (*WorkloadMonitorList) DeepCopy ¶
func (in *WorkloadMonitorList) DeepCopy() *WorkloadMonitorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadMonitorList.
func (*WorkloadMonitorList) DeepCopyInto ¶
func (in *WorkloadMonitorList) DeepCopyInto(out *WorkloadMonitorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WorkloadMonitorList) DeepCopyObject ¶
func (in *WorkloadMonitorList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type WorkloadMonitorSpec ¶
type WorkloadMonitorSpec struct {
// Selector is a label selector to find workloads to monitor
// +required
Selector map[string]string `json:"selector"`
// Kind specifies the kind of the workload
// +optional
Kind string `json:"kind,omitempty"`
// Type specifies the type of the workload
// +optional
Type string `json:"type,omitempty"`
// Version specifies the version of the workload
// +optional
Version string `json:"version,omitempty"`
// MinReplicas specifies the minimum number of replicas that should be available
// +kubebuilder:validation:Minimum=0
// +optional
MinReplicas *int32 `json:"minReplicas,omitempty"`
// Replicas is the desired number of replicas
// If not specified, will use observedReplicas as the target
// +kubebuilder:validation:Minimum=0
// +optional
Replicas *int32 `json:"replicas,omitempty"`
}
WorkloadMonitorSpec defines the desired state of WorkloadMonitor
func (*WorkloadMonitorSpec) DeepCopy ¶
func (in *WorkloadMonitorSpec) DeepCopy() *WorkloadMonitorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadMonitorSpec.
func (*WorkloadMonitorSpec) DeepCopyInto ¶
func (in *WorkloadMonitorSpec) DeepCopyInto(out *WorkloadMonitorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadMonitorStatus ¶
type WorkloadMonitorStatus struct {
// Operational indicates if the workload meets all operational requirements
// +optional
Operational *bool `json:"operational,omitempty"`
// AvailableReplicas is the number of ready replicas
// +optional
AvailableReplicas int32 `json:"availableReplicas"`
// ObservedReplicas is the total number of pods observed
// +optional
ObservedReplicas int32 `json:"observedReplicas"`
}
WorkloadMonitorStatus defines the observed state of WorkloadMonitor
func (*WorkloadMonitorStatus) DeepCopy ¶
func (in *WorkloadMonitorStatus) DeepCopy() *WorkloadMonitorStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadMonitorStatus.
func (*WorkloadMonitorStatus) DeepCopyInto ¶
func (in *WorkloadMonitorStatus) DeepCopyInto(out *WorkloadMonitorStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkloadStatus ¶
type WorkloadStatus struct {
// Kind represents the type of workload (redis, postgres, etc.)
// +required
Kind string `json:"kind"`
// Type represents the specific role of the workload (redis, sentinel, etc.)
// If not specified, defaults to Kind
// +optional
Type string `json:"type,omitempty"`
// Resources specifies the compute resources allocated to this workload
// +required
Resources map[string]resource.Quantity `json:"resources"`
// Operational indicates if all pods of the workload are ready
// +optional
Operational bool `json:"operational"`
}
WorkloadStatus defines the observed state of Workload
func (*WorkloadStatus) DeepCopy ¶
func (in *WorkloadStatus) DeepCopy() *WorkloadStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkloadStatus.
func (*WorkloadStatus) DeepCopyInto ¶
func (in *WorkloadStatus) DeepCopyInto(out *WorkloadStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.