Documentation
¶
Index ¶
Constants ¶
const ( Prefix = "training.pai.io" Finalizer = Prefix + "/job-protector" AIMasterRole = "AIMaster" LabelGroupName = "group-name" LabelJobName = "job-name" LabelReplicaType = "replica-type" AnnotationRestartJob = "kubedl.io/immediately-start-worker" AnnotationEnableJobMonitor = "pai.ai/enable-error-monitoring" FinalizerPreemptProtector = Prefix + "/preempt-protector" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIMasterSpec ¶
type AIMasterSpec struct {
// Enabled specifies if AIMaster is enabled. Defaults to true.
Enabled *bool `json:"enabled,omitempty"`
// Image specifies the container image of AIMaster.
//+kubebuilder:validation:Optional
Image string `json:"image,omitempty"`
// ServiceAccountName specifies the service account name of AIMaster.
//+kubebuilder:validation:Optional
ServiceAccountName string `json:"serviceAccountName,omitempty"`
// RestartPolicy specifies the restart policy for AIMaster.
// One of Always, OnFailure, Never and ExitCode.
// Defaults to Never.
//+kubebuilder:validation:Optional
RestartPolicy corev1.RestartPolicy `json:"restartPolicy,omitempty"`
// JobMonitorPolicy specifies the parameters for job monitors.
//+kubebuilder:validation:Optional
JobMonitorPolicy *JobMonitorPolicy `json:"jobMonitorPolicy,omitempty"`
// ExtraArgs adds additional cmd args to the AIMaster process.
//+kubebuilder:validation:Optional
ExtraArgs string `json:"extraArgs,omitempty"`
}
AIMasterSpec configures AIMaster parameters. +k8s:deepcopy-gen=true
func (*AIMasterSpec) DeepCopy ¶
func (in *AIMasterSpec) DeepCopy() *AIMasterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AIMasterSpec.
func (*AIMasterSpec) DeepCopyInto ¶
func (in *AIMasterSpec) DeepCopyInto(out *AIMasterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AIMasterStatus ¶
type AIMasterStatus struct {
// to be extended
AIMasterPodPhase corev1.PodPhase `json:"aimasterPodPhase,omitempty"`
ServiceReady bool `json:"serviceReady,omitempty"`
}
AIMasterStatus represents the current observed state of AIMaster.
type JobMonitorPolicy ¶
type JobMonitorPolicy struct {
//+kubebuilder:validation:Optional
EnableJobRestart *bool `json:"enableJobRestart,omitempty"`
//+kubebuilder:validation:Optional
MaxNumOfJobRestart *int32 `json:"maxNumOfJobRestart,omitempty"`
//+kubebuilder:validation:Optional
ExecutionMode *string `json:"executionMode,omitempty"`
//+kubebuilder:validation:Optional
MaxToleratedFailureRate *string `json:"maxToleratedFailureRate,omitempty"`
//+kubebuilder:validation:Optional
EnableLogHangDetection *bool `json:"enableLogHangDetection,omitempty"`
//+kubebuilder:validation:Optional
LogHangIntervalInSeconds *int32 `json:"logHangIntervalInSeconds,omitempty"`
//+kubebuilder:validation:Optional
EnablePodCompletedDetection *bool `json:"enablePodCompletedDetection,omitempty"`
//+kubebuilder:validation:Optional
PodCompletedIntervalInSeconds *int32 `json:"podCompletedIntervalInSeconds,omitempty"`
//+kubebuilder:validation:Optional
EnableLogDirectToNas *bool `json:"enableLogDirectToNas,omitempty"`
//+kubebuilder:validation:Optional
MaxNumOfSameError *int32 `json:"maxNumOfSameError,omitempty"`
}
JobMonitorPolicy specifies the parameters for job monitors. +k8s:deepcopy-gen=true
func (*JobMonitorPolicy) DeepCopy ¶
func (in *JobMonitorPolicy) DeepCopy() *JobMonitorPolicy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobMonitorPolicy.
func (*JobMonitorPolicy) DeepCopyInto ¶
func (in *JobMonitorPolicy) DeepCopyInto(out *JobMonitorPolicy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JobStatus ¶
type JobStatus struct {
commonv1.JobStatus `json:",inline"` // Embed commonv1.JobStatus inline
AIMasterStatus AIMasterStatus `json:"aimaster,omitempty"`
}
JobStatus represents the current observed state of the training Job. +k8s:deepcopy-gen=true
func (*JobStatus) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobStatus.
func (*JobStatus) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.