Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the kubedl.io v1alpha1 API group +kubebuilder:object:generate=true +groupName=kubedl.io
Index ¶
- Constants
- Variables
- func RegisterDefaults(scheme *runtime.Scheme) error
- func Resource(resource string) schema.GroupResource
- func SetDefaults_MarsJob(job *MarsJob)
- func SetObjectDefaults_MarsJob(in *MarsJob)
- func SetObjectDefaults_MarsJobList(in *MarsJobList)
- type MarsJob
- type MarsJobList
- type MarsJobSpec
- type MarsWorkerMemoryTuningPolicy
Constants ¶
const ( DefaultContainerName = "mars" DefaultPortName = "mars-port" DefaultPort = 11111 DefaultSchedulerRestartPolicy = v1.RestartPolicyNever DefaultWebServiceRestartPolicy = v1.RestartPolicyAlways DefaultWorkerRestartPolicy = v1.RestartPolicyExitCode )
const ( Kind = "MarsJob" GroupName = "kubedl.io" GroupVersion = "v1alpha1" )
const ( // MarsReplicaTypeScheduler is the type for scheduler role in MarsJob, schedule // graph-based workflow including 'operand' and 'chunk' to workers. MarsReplicaTypeScheduler commonv1.ReplicaType = "Scheduler" // MarsReplicaTypeWorker is the type for accepting the scheduled operand from // scheduler do the real execution, it will pull data(chunk) from mounted storage // or other workers, and notify its execution result to scheduler by callback. MarsReplicaTypeWorker commonv1.ReplicaType = "Worker" // MarsReplicaTypeWebService is the type for web-service instance, accepting // requests from end user and forwarding the whole tensor-graph to scheduler. // WebService provides end users with a dashboard so that they can track job // status and submit tensor-graph tasks interactively. MarsReplicaTypeWebService commonv1.ReplicaType = "WebService" )
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: GroupVersion} GroupVersionKind = SchemeGroupVersion.WithKind(Kind) // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} // AddToScheme adds the types in this group-version to the given scheme. AddToScheme = SchemeBuilder.AddToScheme )
Functions ¶
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_MarsJob ¶
func SetDefaults_MarsJob(job *MarsJob)
SetDefaults_MarsJob sets any unspecified values to defaults.
func SetObjectDefaults_MarsJob ¶
func SetObjectDefaults_MarsJob(in *MarsJob)
func SetObjectDefaults_MarsJobList ¶
func SetObjectDefaults_MarsJobList(in *MarsJobList)
Types ¶
type MarsJob ¶
type MarsJob struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec MarsJobSpec `json:"spec,omitempty"` Status commonv1.JobStatus `json:"status,omitempty"` }
MarsJob represents a mars job instance nad
func (*MarsJob) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsJob.
func (*MarsJob) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MarsJob) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MarsJobList ¶
type MarsJobList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []MarsJob `json:"items"` }
MarsJobList contains a list of MarsJob
func (*MarsJobList) DeepCopy ¶
func (in *MarsJobList) DeepCopy() *MarsJobList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsJobList.
func (*MarsJobList) DeepCopyInto ¶
func (in *MarsJobList) DeepCopyInto(out *MarsJobList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MarsJobList) DeepCopyObject ¶
func (in *MarsJobList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type MarsJobSpec ¶
type MarsJobSpec 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. commonv1.RunPolicy `json:",inline"` // WorkerMemoryTuningPolicy provides multiple memory tuning policies to mars worker // spec, such as cache size, cold data paths... WorkerMemoryTuningPolicy *MarsWorkerMemoryTuningPolicy `json:"workerMemoryTuningPolicy,omitempty"` // WebHost is the domain address of webservice that expose to external users. WebHost *string `json:"webHost,omitempty"` // MarsReplicaSpecs is a map of MarsReplicaType(key) to ReplicaSpec(value), // specifying replicas and template of each type. MarsReplicaSpecs map[commonv1.ReplicaType]*commonv1.ReplicaSpec `json:"marsReplicaSpecs"` }
MarsJobSpec defines the desired state of MarsJob
func (*MarsJobSpec) DeepCopy ¶
func (in *MarsJobSpec) DeepCopy() *MarsJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsJobSpec.
func (*MarsJobSpec) DeepCopyInto ¶
func (in *MarsJobSpec) DeepCopyInto(out *MarsJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MarsWorkerMemoryTuningPolicy ¶
type MarsWorkerMemoryTuningPolicy struct { // PlasmaStore specify the socket path of plasma store that handles shared memory // between all worker processes. PlasmaStore *string `json:"plasmaStore,omitempty"` // LockFreeFileIO indicates whether spill dirs are dedicated or not. LockFreeFileIO *bool `json:"lockFreeFileIO,omitempty"` // SpillDirs specify multiple directory paths, when size of in-memory objects is // about to reach the limitation, mars workers will swap cold data out to spill dirs // and persist in ephemeral-storage. SpillDirs []string `json:"spillDirs,omitempty"` // WorkerCachePercentage specify the percentage of total available memory size can // be used as cache, it will be overridden by workerCacheSize if it is been set. WorkerCachePercentage *int32 `json:"workerCachePercentage,omitempty"` // WorkerCacheSize specify the exact cache quantity can be used. WorkerCacheSize *resource.Quantity `json:"workerCacheSize,omitempty"` }
MarsWorkerMemoryTuningPolicy defines memory tuning policies that will be applied to workers.
func (*MarsWorkerMemoryTuningPolicy) DeepCopy ¶
func (in *MarsWorkerMemoryTuningPolicy) DeepCopy() *MarsWorkerMemoryTuningPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MarsWorkerMemoryTuningPolicy.
func (*MarsWorkerMemoryTuningPolicy) DeepCopyInto ¶
func (in *MarsWorkerMemoryTuningPolicy) DeepCopyInto(out *MarsWorkerMemoryTuningPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.