Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the training v1 API group +kubebuilder:object:generate=true +groupName=training.artway.ai
Index ¶
Constants ¶
const KIND = "TJob"
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "training.artway.ai", Version: "v1"} // 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 CleanPolicy ¶
type CleanPolicy string
const ( // CleanAlways policy will always clean pods CleanAlways CleanPolicy = "Always" // CleanNever policy will nerver clean pods CleanNever CleanPolicy = "Never" // CleanOnFailure policy will clean pods only on job failed CleanOnFailure CleanPolicy = "OnFailure" // CleanOnCompletion policy will clean pods only on job completed CleanOnCompletion CleanPolicy = "OnCompletion" )
type JobPhase ¶
type JobPhase string
const ( Starting JobPhase = "Starting" Pending JobPhase = "Pending" Scaling JobPhase = "Scaling" Aborting JobPhase = "Aborting" Aborted JobPhase = "Aborted" Running JobPhase = "Running" Restarting JobPhase = "Restarting" Completing JobPhase = "Completing" Completed JobPhase = "Completed" Terminating JobPhase = "Terminating" Terminated JobPhase = "Terminated" Failed JobPhase = "Failed" Succeed JobPhase = "Succeed" Unknown JobPhase = "Unknown" )
type StartPolicy ¶
type StartPolicy string
const ( StartImmediately StartPolicy = "Immediately" StartAfterRunning StartPolicy = "AfterRunning" StartAfterSucceeded StartPolicy = "AfterSucceeded" )
type TJob ¶
type TJob struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec TJobSpec `json:"spec,omitempty"` Status TJobStatus `json:"status,omitempty"` }
TJob is the Schema for the tjobs API
func (*TJob) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TJob.
func (*TJob) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TJob) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TJobList ¶
type TJobList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []TJob `json:"items"` }
TJobList contains a list of TJob
func (*TJobList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TJobList.
func (*TJobList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TJobList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type TJobSpec ¶
type TJobSpec struct { // CleanPodPolicy defines whether to clean pod after job finished, default Never // +optional CleanPodPolicy CleanPolicy `json:"cleanPodPolicy,omitempty"` // Intranet defines the communication mode inter pods : PodIP, Service or Host // +optional Intranet Intranet `json:"intranet,omitempty"` // Elastic indicates the elastic level // +optional Elastic *int32 `json:"elastic,omitempty"` // Tasks defines the resources in list, the order determinate the running order Tasks []*TaskSpec `json:"tasks,omitempty"` // Framework defines the framework of the job // +optional Framework *string `json:"framework,omitempty"` // StartPolicy indicates how the tasks in the list start depend on previous status // +optional StartPolicy *StartPolicy `json:"startPolicy,omitempty"` }
TJobSpec defines the desired state of TJob
func (*TJobSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TJobSpec.
func (*TJobSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TJobStatus ¶
type TJobStatus struct { // The latest available observations of an object's current state. Conditions []batchv1.JobCondition `json:"conditions,omitempty"` // The phase of TJob. Phase JobPhase `json:"phase,omitempty"` // ResourceStatues of tasks Tasks map[string]*TaskStatus `json:"tasks,omitempty"` // StartTime indicate when the job started StartTime *metav1.Time `json:"startTime,omitempty"` // CompletionTime indicate when the job completed/failed CompletionTime *metav1.Time `json:"completionTime,omitempty"` ObservedGeneration int `json:"observedGeneration,omitempty"` }
TJobStatus defines the observed state of TJob
func (*TJobStatus) DeepCopy ¶
func (in *TJobStatus) DeepCopy() *TJobStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TJobStatus.
func (*TJobStatus) DeepCopyInto ¶
func (in *TJobStatus) DeepCopyInto(out *TJobStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TaskSpec ¶
type TaskSpec struct { // Replicas replica Replicas int `json:"replicas"` // Requests set the minimal replicas of server to be run Requests *int `json:"requests,omitempty"` // Requests set the maximal replicas of server to be run Limits *int `json:"limits,omitempty"` // Template specifies the podspec of a server Template corev1.PodTemplateSpec `json:"template,omitempty"` // Name name the resource, validated by Name string `json:"name"` }
func (*TaskSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskSpec.
func (*TaskSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TaskStatus ¶
type TaskStatus struct { // Pending Pending int `json:"pending,omitempty"` // Starting Starting int `json:"starting,omitempty"` // Running Running int `json:"running,omitempty"` // Failed Failed int `json:"failed,omitempty"` // Success Succeeded int `json:"succeeded,omitempty"` // Unknown Unknown int `json:"unknown,omitempty"` // A list of pointer to pods Refs []corev1.ObjectReference `json:"refs,omitempty"` }
func (*TaskStatus) DeepCopy ¶
func (in *TaskStatus) DeepCopy() *TaskStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskStatus.
func (*TaskStatus) DeepCopyInto ¶
func (in *TaskStatus) DeepCopyInto(out *TaskStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.