Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the kai v1alpha1 API group +kubebuilder:object:generate=true +groupName=kai.alibabacloud.com
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type ETReplicaSpec
- type ETReplicaSpecs
- type ETReplicaType
- type EnvSpec
- type ScaleIn
- func (in *ScaleIn) DeepCopy() *ScaleIn
- func (in *ScaleIn) DeepCopyInto(out *ScaleIn)
- func (in *ScaleIn) DeepCopyObject() runtime.Object
- func (s *ScaleIn) GetFullName() string
- func (s *ScaleIn) GetJobStatus() *common.JobStatus
- func (s *ScaleIn) GetPodNames() []string
- func (s *ScaleIn) GetScaleType() string
- func (s *ScaleIn) GetScriptSpec() ScaleScriptSpec
- func (s *ScaleIn) GetSelector() Selector
- func (s *ScaleIn) GetStatus() interface{}
- type ScaleInList
- type ScaleInSpec
- type ScaleInStatus
- type ScaleOut
- func (in *ScaleOut) DeepCopy() *ScaleOut
- func (in *ScaleOut) DeepCopyInto(out *ScaleOut)
- func (in *ScaleOut) DeepCopyObject() runtime.Object
- func (s *ScaleOut) GetFullName() string
- func (s *ScaleOut) GetJobStatus() *common.JobStatus
- func (s *ScaleOut) GetPodNames() []string
- func (s *ScaleOut) GetScaleType() string
- func (s *ScaleOut) GetScriptSpec() ScaleScriptSpec
- func (s *ScaleOut) GetSelector() Selector
- func (s *ScaleOut) GetStatus() interface{}
- type ScaleOutList
- type ScaleOutSpec
- type ScaleOutStatus
- type ScaleScriptSpec
- type Selector
- type ToAddSpec
- type ToDeleteSpec
- type TrainingJob
- func (in *TrainingJob) DeepCopy() *TrainingJob
- func (in *TrainingJob) DeepCopyInto(out *TrainingJob)
- func (in *TrainingJob) DeepCopyObject() runtime.Object
- func (j *TrainingJob) GetAttachMode() string
- func (j *TrainingJob) GetJobStatus() *common.JobStatus
- func (j *TrainingJob) GetStatus() interface{}
- type TrainingJobList
- type TrainingJobSpec
- type TrainingJobStatus
Constants ¶
const ( SCALER_TYPE_SCALEIN = "ScalingIn" SCALER_TYPE_SCALEOUT = "ScalingOut" )
const ( // ETReplicaTypeLauncher is the type for launcher replica. ETReplicaTypeLauncher ETReplicaType = "Launcher" // ETReplicaTypeWorker is the type for worker replicas. ETReplicaTypeWorker ETReplicaType = "Worker" AttachModeSSH = "ssh" AttachModeKubexec = "kubexec" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "kai.alibabacloud.com", 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 // SchemeGroupVersionKind is the GroupVersionKind of the resource. SchemeGroupVersionKind = GroupVersion.WithKind("TrainingJob") )
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Types ¶
type ETReplicaSpec ¶
type ETReplicaSpec struct { // Replicas is the desired number of replicas of the given template. // If unspecified, defaults to 1. // +kubebuilder:validation:Minimum=1 Replicas *int32 `json:"replicas,omitempty"` // MaxReplicas is the desired max number of replicas of the given template. // If unspecified, MaxReplicas defaults to infinite. // +kubebuilder:validation:Minimum=1 MaxReplicas *int32 `json:"maxReplicas,omitempty"` // MinReplicas is the desired min number of replicas of the given template. // If unspecified, MinReplicas defaults to Replicas // +kubebuilder:validation:Minimum=1 MinReplicas *int32 `json:"minReplicas,omitempty"` // Template is the object that describes the pod that // will be created for this replica. RestartPolicy in PodTemplateSpec // will be overide by RestartPolicy in ReplicaSpec Template v1.PodTemplateSpec `json:"template,omitempty"` // Restart policy for all replicas within the job. // One of Always, OnFailure, Never and ExitCode. // Default to Never. RestartPolicy *common.RestartPolicy `json:"restartPolicy,omitempty"` }
func (*ETReplicaSpec) DeepCopy ¶
func (in *ETReplicaSpec) DeepCopy() *ETReplicaSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ETReplicaSpec.
func (*ETReplicaSpec) DeepCopyInto ¶
func (in *ETReplicaSpec) DeepCopyInto(out *ETReplicaSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ETReplicaSpecs ¶
type ETReplicaSpecs struct { Launcher *common.ReplicaSpec `json:"launcher"` Worker *ETReplicaSpec `json:"worker"` }
func (*ETReplicaSpecs) DeepCopy ¶
func (in *ETReplicaSpecs) DeepCopy() *ETReplicaSpecs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ETReplicaSpecs.
func (*ETReplicaSpecs) DeepCopyInto ¶
func (in *ETReplicaSpecs) DeepCopyInto(out *ETReplicaSpecs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnvSpec ¶
func (*EnvSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvSpec.
func (*EnvSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScaleIn ¶
type ScaleIn struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ScaleInSpec `json:"spec,omitempty"` // Most recently observed status of the etJob. // Read-only (modified by the system). Status ScaleInStatus `json:"status,omitempty"` }
ScaleIn is the Schema for the scaleins API
func (*ScaleIn) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleIn.
func (*ScaleIn) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ScaleIn) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ScaleIn) GetFullName ¶
func (*ScaleIn) GetJobStatus ¶
func (*ScaleIn) GetPodNames ¶
func (*ScaleIn) GetScaleType ¶
func (*ScaleIn) GetScriptSpec ¶
func (s *ScaleIn) GetScriptSpec() ScaleScriptSpec
func (*ScaleIn) GetSelector ¶
type ScaleInList ¶
type ScaleInList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ScaleIn `json:"items"` }
ScaleInList contains a list of ScaleIn
func (*ScaleInList) DeepCopy ¶
func (in *ScaleInList) DeepCopy() *ScaleInList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleInList.
func (*ScaleInList) DeepCopyInto ¶
func (in *ScaleInList) DeepCopyInto(out *ScaleInList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ScaleInList) DeepCopyObject ¶
func (in *ScaleInList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ScaleInSpec ¶
type ScaleInSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file ScaleScriptSpec `json:",inline"` // Optional number of retries to execute script. // +optional BackoffLimit *int32 `json:"backoffLimit,omitempty"` ToDelete *ToDeleteSpec `json:"toDelete,omitempty"` Selector Selector `json:"selector,omitempty"` }
ScaleInSpec defines the desired state of ScaleIn
func (*ScaleInSpec) DeepCopy ¶
func (in *ScaleInSpec) DeepCopy() *ScaleInSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleInSpec.
func (*ScaleInSpec) DeepCopyInto ¶
func (in *ScaleInSpec) DeepCopyInto(out *ScaleInSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScaleInStatus ¶
type ScaleInStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "make" to regenerate code after modifying this file common.JobStatus `json:",inline"` // record delete pods for scalein ToDeletePods []string `json:"toDeletePods,omitempty"` }
ScaleInStatus defines the observed state of ScaleIn
func (*ScaleInStatus) DeepCopy ¶
func (in *ScaleInStatus) DeepCopy() *ScaleInStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleInStatus.
func (*ScaleInStatus) DeepCopyInto ¶
func (in *ScaleInStatus) DeepCopyInto(out *ScaleInStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScaleOut ¶
type ScaleOut struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ScaleOutSpec `json:"spec,omitempty"` // Most recently observed status of the etJob. // Read-only (modified by the system). Status ScaleOutStatus `json:"status,omitempty"` }
ScaleOut is the Schema for the scaleouts API
func (*ScaleOut) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleOut.
func (*ScaleOut) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ScaleOut) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ScaleOut) GetFullName ¶
func (*ScaleOut) GetJobStatus ¶
func (*ScaleOut) GetPodNames ¶
func (*ScaleOut) GetScaleType ¶
func (*ScaleOut) GetScriptSpec ¶
func (s *ScaleOut) GetScriptSpec() ScaleScriptSpec
func (*ScaleOut) GetSelector ¶
type ScaleOutList ¶
type ScaleOutList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ScaleOut `json:"items"` }
ScaleOutList contains a list of ScaleOut
func (*ScaleOutList) DeepCopy ¶
func (in *ScaleOutList) DeepCopy() *ScaleOutList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleOutList.
func (*ScaleOutList) DeepCopyInto ¶
func (in *ScaleOutList) DeepCopyInto(out *ScaleOutList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ScaleOutList) DeepCopyObject ¶
func (in *ScaleOutList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ScaleOutSpec ¶
type ScaleOutSpec struct { // INSERT ADDITIONAL SPEC FIELDS - desired state of cluster // Important: Run "make" to regenerate code after modifying this file ScaleScriptSpec `json:",inline"` // Optional number of retries to execute script. // +optional BackoffLimit *int32 `json:"backoffLimit,omitempty"` ToAdd *ToAddSpec `json:"toAdd,omitempty"` Selector Selector `json:"selector,omitempty"` }
ScaleOutSpec defines the desired state of ScaleOut
func (*ScaleOutSpec) DeepCopy ¶
func (in *ScaleOutSpec) DeepCopy() *ScaleOutSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleOutSpec.
func (*ScaleOutSpec) DeepCopyInto ¶
func (in *ScaleOutSpec) DeepCopyInto(out *ScaleOutSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScaleOutStatus ¶
type ScaleOutStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "make" to regenerate code after modifying this file common.JobStatus `json:",inline"` AddPods []string `json:"addPods,omitempty"` }
ScaleOutStatus defines the observed state of ScaleOut
func (*ScaleOutStatus) DeepCopy ¶
func (in *ScaleOutStatus) DeepCopy() *ScaleOutStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleOutStatus.
func (*ScaleOutStatus) DeepCopyInto ¶
func (in *ScaleOutStatus) DeepCopyInto(out *ScaleOutStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScaleScriptSpec ¶
type ScaleScriptSpec struct { Script string `json:"script,omitempty"` // Optional number of timeout to execute script. // +optional Timeout *int32 `json:"timeout,omitempty"` Env []EnvSpec `json:"env,omitempty"` }
func (*ScaleScriptSpec) DeepCopy ¶
func (in *ScaleScriptSpec) DeepCopy() *ScaleScriptSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScaleScriptSpec.
func (*ScaleScriptSpec) DeepCopyInto ¶
func (in *ScaleScriptSpec) DeepCopyInto(out *ScaleScriptSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ScaleScriptSpec) GetTimeout ¶
func (s ScaleScriptSpec) GetTimeout() int32
type Selector ¶
type Selector struct {
Name string `json:"name,omitempty"`
}
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 ToAddSpec ¶
type ToAddSpec struct {
Count *int32 `json:"count,omitempty"`
}
func (*ToAddSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ToAddSpec.
func (*ToAddSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ToDeleteSpec ¶
type ToDeleteSpec struct { Count int `json:"count,omitempty"` PodNames []string `json:"podNames,omitempty"` }
func (*ToDeleteSpec) DeepCopy ¶
func (in *ToDeleteSpec) DeepCopy() *ToDeleteSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ToDeleteSpec.
func (*ToDeleteSpec) DeepCopyInto ¶
func (in *ToDeleteSpec) DeepCopyInto(out *ToDeleteSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TrainingJob ¶
type TrainingJob struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TrainingJobSpec `json:"spec,omitempty"` // Most recently observed status of the TrainingJob. // Read-only (modified by the system). Status TrainingJobStatus `json:"status,omitempty"` }
TrainingJob is the Schema for the trainingjobs API
func (*TrainingJob) DeepCopy ¶
func (in *TrainingJob) DeepCopy() *TrainingJob
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrainingJob.
func (*TrainingJob) DeepCopyInto ¶
func (in *TrainingJob) DeepCopyInto(out *TrainingJob)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TrainingJob) DeepCopyObject ¶
func (in *TrainingJob) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*TrainingJob) GetAttachMode ¶
func (j *TrainingJob) GetAttachMode() string
func (*TrainingJob) GetJobStatus ¶
func (j *TrainingJob) GetJobStatus() *common.JobStatus
func (*TrainingJob) GetStatus ¶
func (j *TrainingJob) GetStatus() interface{}
type TrainingJobList ¶
type TrainingJobList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []TrainingJob `json:"items"` }
TrainingJobList contains a list of TrainingJob
func (*TrainingJobList) DeepCopy ¶
func (in *TrainingJobList) DeepCopy() *TrainingJobList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrainingJobList.
func (*TrainingJobList) DeepCopyInto ¶
func (in *TrainingJobList) DeepCopyInto(out *TrainingJobList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TrainingJobList) DeepCopyObject ¶
func (in *TrainingJobList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TrainingJobSpec ¶
type TrainingJobSpec struct { // CleanPodPolicy defines the policy that whether to kill pods after the job completes. // Defaults to None. CleanPodPolicy *common.CleanPodPolicy `json:"cleanPodPolicy,omitempty"` // `ETReplicaSpecs` contains maps from `ETReplicaType` to `ReplicaSpec` that // specify the ET replicas to run. // +kubebuilder:pruning:PreserveUnknownFields ETReplicaSpecs ETReplicaSpecs `json:"etReplicaSpecs"` // Specifies the mode when launcher attach to workers. // available option is ssh / kubexec // Defaults is kubexec. // +optional LauncherAttachMode *string `json:"launcherAttachMode,omitempty"` // Specifies the number of slots per worker used in hostfile. // Defaults to 1. // +optional SlotsPerWorker *int32 `json:"slotsPerWorker,omitempty"` }
TrainingJobSpec defines the desired state of TrainingJob
func (*TrainingJobSpec) DeepCopy ¶
func (in *TrainingJobSpec) DeepCopy() *TrainingJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrainingJobSpec.
func (*TrainingJobSpec) DeepCopyInto ¶
func (in *TrainingJobSpec) DeepCopyInto(out *TrainingJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TrainingJobStatus ¶
type TrainingJobStatus struct { // INSERT ADDITIONAL STATUS FIELD - define observed state of cluster // Important: Run "make" to regenerate code after modifying this file common.JobStatus `json:",inline"` TargetWorkers []string `json:"targetWorkers,omitempty"` CurrentWorkers []string `json:"currentWorkers,omitempty"` }
TrainingJobStatus defines the observed state of TrainingJob
func (*TrainingJobStatus) DeepCopy ¶
func (in *TrainingJobStatus) DeepCopy() *TrainingJobStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TrainingJobStatus.
func (*TrainingJobStatus) DeepCopyInto ¶
func (in *TrainingJobStatus) DeepCopyInto(out *TrainingJobStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.