Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the inference v1alpha1 API group +kubebuilder:object:generate=true +groupName=inference.kubedl.io
Index ¶
- Constants
- Variables
- func EnableFallbackToLogsOnErrorTerminationMessagePolicy(podSpec *corev1.PodSpec)
- func Int32(v int32) *int32
- func RegisterDefaults(scheme *runtime.Scheme) error
- func Resource(resource string) schema.GroupResource
- func SetDefaults_ElasticBatchJob(job *ElasticBatchJob)
- func SetObjectDefaults_ElasticBatchJob(in *ElasticBatchJob)
- func SetObjectDefaults_ElasticBatchJobList(in *ElasticBatchJobList)
- type ElasticBatchJob
- type ElasticBatchJobList
- type ElasticBatchJobSpec
Constants ¶
const ( ElasticBatchJobKind = "ElasticBatchJob" // ElasticBatchJobDefaultContainerName is the name of the ElasticBatchJob container. ElasticBatchJobDefaultContainerName = "elasticbatch" // ElasticBatchJobDefaultPortName is name of the port used to communicate between AIMaster and // workers. ElasticBatchJobDefaultPortName = "elstcbatch-port" // ElasticBatchJobDefaultPort is default value of the port. ElasticBatchJobDefaultPort = 23456 // ElasticBatchJobDefaultMasterRestartPolicy is default RestartPolicy for Master ElasticBatchReplicaSpec. ElasticBatchJobDefaultAIMasterRestartPolicy = common.RestartPolicyNever // ElasticBatchJobDefaultWorkerRestartPolicy is default RestartPolicy for Worker ElasticBatchReplicaSpec, ElasticBatchJobDefaultWorkerRestartPolicy = common.RestartPolicyExitCode )
const ( // ElasticBatchReplicaTypeAIMaster is the type of AIMaster of distributed ElasticBatchJob ElasticBatchReplicaTypeAIMaster common.ReplicaType = common.JobReplicaTypeAIMaster // ElasticBatchReplicaTypeWorker is the type for workers of distributed ElasticBatchJob. ElasticBatchReplicaTypeWorker common.ReplicaType = "Worker" )
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "inference.kubedl.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 ¶
func Int32 ¶
Int32 is a helper routine that allocates a new int32 value to store v and returns a pointer to it.
func RegisterDefaults ¶
RegisterDefaults adds defaulters functions to the given scheme. Public to allow building arbitrary schemes. All generated defaulters are covering - they call all nested defaulters.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group-qualified GroupResource.
func SetDefaults_ElasticBatchJob ¶
func SetDefaults_ElasticBatchJob(job *ElasticBatchJob)
SetDefaults_ElasticBatchJob sets any unspecified values to defaults.
func SetObjectDefaults_ElasticBatchJob ¶
func SetObjectDefaults_ElasticBatchJob(in *ElasticBatchJob)
func SetObjectDefaults_ElasticBatchJobList ¶
func SetObjectDefaults_ElasticBatchJobList(in *ElasticBatchJobList)
Types ¶
type ElasticBatchJob ¶
type ElasticBatchJob struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec ElasticBatchJobSpec `json:"spec,omitempty"` Status common.JobStatus `json:"status,omitempty"` }
Represents a ElasticBatchJob resource.
func (*ElasticBatchJob) DeepCopy ¶
func (in *ElasticBatchJob) DeepCopy() *ElasticBatchJob
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticBatchJob.
func (*ElasticBatchJob) DeepCopyInto ¶
func (in *ElasticBatchJob) DeepCopyInto(out *ElasticBatchJob)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ElasticBatchJob) DeepCopyObject ¶
func (in *ElasticBatchJob) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ElasticBatchJobList ¶
type ElasticBatchJobList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ElasticBatchJob `json:"items"` }
func (*ElasticBatchJobList) DeepCopy ¶
func (in *ElasticBatchJobList) DeepCopy() *ElasticBatchJobList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticBatchJobList.
func (*ElasticBatchJobList) DeepCopyInto ¶
func (in *ElasticBatchJobList) DeepCopyInto(out *ElasticBatchJobList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ElasticBatchJobList) DeepCopyObject ¶
func (in *ElasticBatchJobList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ElasticBatchJobSpec ¶
type ElasticBatchJobSpec struct { // RunPolicy encapsulates various runtime policies of the distributed training // job, for example how to clean up resources and how long the job can stay // active. common.RunPolicy `json:",inline"` // SuccessPolicy defines the policy to mark the ElasticBatchJob as succeeded when the job contains master role. // Value "" means the default policy that the job is succeeded if all workers are succeeded or master completed, // Value "AllWorkers" means the job is succeeded if all workers *AND* master are succeeded. // Default to "" // +optional SuccessPolicy *common.SuccessPolicy `json:"successPolicy,omitempty"` // A map of ElasticBatchReplicaType (type) to ReplicaSpec (value). Specifies the ElasticBatchJob cluster configuration. // For example, // { // "AIMaster": ReplicaSpec, // "Worker": ReplicaSpec, // } ElasticBatchReplicaSpecs map[common.ReplicaType]*common.ReplicaSpec `json:"elasticBatchReplicaSpecs"` }
ElasticBatchJobSpec defines the desired state of ElasticBatchJob
func (*ElasticBatchJobSpec) DeepCopy ¶
func (in *ElasticBatchJobSpec) DeepCopy() *ElasticBatchJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ElasticBatchJobSpec.
func (*ElasticBatchJobSpec) DeepCopyInto ¶
func (in *ElasticBatchJobSpec) DeepCopyInto(out *ElasticBatchJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.