Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the bagua v1alpha1 API group +kubebuilder:object:generate=true +groupName=bagua.kuaishou.com
Index ¶
Constants ¶
const ( ErrInvalidDefinition = "InvalidDefinition" JobOwnerKey = ".metadata.controller" DefaultContainerName = "bagua" )
const ( ReplicaMaster commonv1.ReplicaType = "master" ReplicaWorker commonv1.ReplicaType = "worker" ReplicaEtcd commonv1.ReplicaType = "etcd" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "bagua.kuaishou.com", Version: "v1alpha1"} // GroupVersionKind is group version kind GroupVersionKind = GroupVersion.WithKind("Bagua") // 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 Bagua ¶
type Bagua struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec BaguaSpec `json:"spec,omitempty"` Status BaguaStatus `json:"status,omitempty"` }
Bagua is the Schema for the baguas API
func (*Bagua) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Bagua.
func (*Bagua) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Bagua) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BaguaList ¶
type BaguaList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Bagua `json:"items"` }
BaguaList contains a list of Bagua
func (*BaguaList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaguaList.
func (*BaguaList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BaguaList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BaguaSpec ¶
type BaguaSpec struct { RunPolicy commonv1.RunPolicy `json:"runPolicy,omitempty"` ReplicaSpecs map[commonv1.ReplicaType]*commonv1.ReplicaSpec `json:"replicaSpecs,omitempty"` EnableElastic bool `json:"enableElastic,omitempty"` // +kubebuilder:validation:Minimum=1 MinReplicas *int32 `json:"minReplicas,omitempty"` MaxReplicas *int32 `json:"maxReplicas,omitempty"` }
********
- Spec ********
BaguaSpec defines the desired state of Bagua
func (BaguaSpec) CheckReplicasExist ¶
func (spec BaguaSpec) CheckReplicasExist(replicaTypes []commonv1.ReplicaType) error
func (*BaguaSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaguaSpec.
func (*BaguaSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (BaguaSpec) GetReplicas ¶
func (spec BaguaSpec) GetReplicas(rt commonv1.ReplicaType) int32
type BaguaStatus ¶
type BaguaStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "make" to regenerate code after modifying this file commonv1.JobStatus `json:",inline"` Phase commonv1.JobConditionType `json:"phase,omitempty"` }
********
- Status ********
BaguaStatus defines the observed state of Bagua
func (*BaguaStatus) DeepCopy ¶
func (in *BaguaStatus) DeepCopy() *BaguaStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaguaStatus.
func (*BaguaStatus) DeepCopyInto ¶
func (in *BaguaStatus) DeepCopyInto(out *BaguaStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.