Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the core v1 API group +kubebuilder:object:generate=true +groupName=core.polyaxon.com
Index ¶
- Constants
- Variables
- func GetFailureMessage(entityMessage string, status OperationConditionType, reason string, ...) string
- func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
- type BatchJobSpec
- type CleanPodPolicy
- type KFReplicaSpec
- type MPIJobSpec
- type MPIReplicaType
- type NotificationSpec
- type Operation
- func (instance *Operation) AddLogsFinalizer()
- func (instance *Operation) AddNotificationsFinalizer()
- func (in *Operation) DeepCopy() *Operation
- func (in *Operation) DeepCopyInto(out *Operation)
- func (in *Operation) DeepCopyObject() runtime.Object
- func (instance *Operation) HasLogsFinalizer() bool
- func (instance *Operation) HasNotificationsFinalizer() bool
- func (instance *Operation) HasWarning() bool
- func (instance *Operation) IsBeingDeleted() bool
- func (instance *Operation) IsDone() bool
- func (instance *Operation) IsFailed() bool
- func (instance *Operation) IsRunning() bool
- func (instance *Operation) IsStarting() bool
- func (instance *Operation) IsStopped() bool
- func (instance *Operation) IsSucceeded() bool
- func (instance *Operation) LogFailed(reason, message string) bool
- func (instance *Operation) LogRunning() bool
- func (instance *Operation) LogStarting() bool
- func (instance *Operation) LogStopped(reason, message string) bool
- func (instance *Operation) LogSucceeded() bool
- func (instance *Operation) LogWarning(reason, message string) bool
- func (instance *Operation) RemoveLogsFinalizer()
- func (instance *Operation) RemoveNotificationsFinalizer()
- type OperationCondition
- type OperationConditionType
- type OperationList
- type OperationStatus
- type OperationTriggerNotificationType
- type PyTorchReplicaType
- type PytorchJobSpec
- type ServiceSpec
- type SparkApplicationType
- type SparkDeployMode
- type SparkJobSpec
- type SparkReplicaSpec
- type TFJobSpec
- type TFReplicaType
- type TerminationSpec
Constants ¶
const OperationLogsFinalizer = "operation.logs.finalizers.polyaxon.com"
OperationLogsFinalizer registration
const OperationNotificationsFinalizer = "operation.notifications.finalizers.polyaxon.com"
OperationNotificationsFinalizer registration
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "core.polyaxon.com", 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 ¶
func GetFailureMessage ¶
func GetFailureMessage(entityMessage string, status OperationConditionType, reason string, message string) string
func GetOpenAPIDefinitions ¶
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
Types ¶
type BatchJobSpec ¶
type BatchJobSpec struct { // Template describes the pods that will be created. Template corev1.PodTemplateSpec `json:"template" protobuf:"bytes,1,opt,name=template"` }
BatchJobSpec defines the desired state of a batch job +k8s:openapi-gen=true
func (*BatchJobSpec) DeepCopy ¶
func (in *BatchJobSpec) DeepCopy() *BatchJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BatchJobSpec.
func (*BatchJobSpec) DeepCopyInto ¶
func (in *BatchJobSpec) DeepCopyInto(out *BatchJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type CleanPodPolicy ¶
type CleanPodPolicy string
CleanPodPolicy describes how to deal with pods when the job is finished. +k8s:openapi-gen=true
const ( CleanPodPolicyUndefined CleanPodPolicy = "" CleanPodPolicyAll CleanPodPolicy = "All" CleanPodPolicyRunning CleanPodPolicy = "Running" CleanPodPolicyNone CleanPodPolicy = "None" )
Possible values for CleanPodPolicy
type KFReplicaSpec ¶
type KFReplicaSpec struct { // Replicas is the desired number of replicas of the given template. // If unspecified, defaults to 1. Replicas *int32 `json:"replicas,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 corev1.PodTemplateSpec `json:"template,omitempty"` // Restart policy for all replicas within the job. // One of Always, OnFailure, Never and ExitCode. // Default to Never. RestartPolicy corev1.RestartPolicy `json:"restartPolicy,omitempty"` }
KFReplicaSpec is a description of kubeflow replica +k8s:openapi-gen=true
func (*KFReplicaSpec) DeepCopy ¶
func (in *KFReplicaSpec) DeepCopy() *KFReplicaSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KFReplicaSpec.
func (*KFReplicaSpec) DeepCopyInto ¶
func (in *KFReplicaSpec) DeepCopyInto(out *KFReplicaSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MPIJobSpec ¶
type MPIJobSpec struct { // Defines the policy for cleaning up pods after the Job completes. // Defaults to Running. CleanPodPolicy *CleanPodPolicy `json:"cleanPodPolicy,omitempty" protobuf:"bytes,1,opt,name=cleanPodPolicy"` // CleanPodPolicy defines the policy that whether to kill pods after the job completes. // Defaults to None. SlotsPerWorker *int32 `json:"slotsPerWorker,omitempty" protobuf:"bytes,2,opt,name=slotsPerWorker"` // `MPIReplicaSpecs` contains maps from `MPIReplicaType` to `ReplicaSpec` that // specify the MPI replicas to run. ReplicaSpecs map[MPIReplicaType]KFReplicaSpec `json:"replicaSpecs" protobuf:"bytes,3,opt,name=replicaSpecs"` // MainContainer specifies name of the main container which // executes the MPI code. MainContainer string `json:"mainContainer,omitempty" protobuf:"bytes,3,opt,name=mainContainer"` }
MPIJobSpec defines the desired state of an mpi job +k8s:openapi-gen=true
func (*MPIJobSpec) DeepCopy ¶
func (in *MPIJobSpec) DeepCopy() *MPIJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MPIJobSpec.
func (*MPIJobSpec) DeepCopyInto ¶
func (in *MPIJobSpec) DeepCopyInto(out *MPIJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MPIReplicaType ¶
type MPIReplicaType string
MPIReplicaType is the type for MPIReplica.
const ( // MPIReplicaTypeLauncher is the type for launcher replica. MPIReplicaTypeLauncher MPIReplicaType = "Launcher" // MPIReplicaTypeWorker is the type for worker replicas. MPIReplicaTypeWorker MPIReplicaType = "Worker" )
type NotificationSpec ¶
type NotificationSpec struct { Connections []string `json:"connections" protobuf:"bytes,1,opt,name=connections"` Trigger OperationTriggerNotificationType `json:"trigger" protobuf:"bytes,2,opt,name=trigger"` }
NotificationSpec is definition of how to send notification for new status of this operation +k8s:openapi-gen=true
func (*NotificationSpec) DeepCopy ¶
func (in *NotificationSpec) DeepCopy() *NotificationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotificationSpec.
func (*NotificationSpec) DeepCopyInto ¶
func (in *NotificationSpec) DeepCopyInto(out *NotificationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Operation ¶
type Operation struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Specifies the number of retries before marking this job failed. // +optional Termination TerminationSpec `json:"termination,omitempty" protobuf:"bytes,2,opt,name=termination"` // Flag to set a finalizer for collecting logs // +optional CollectLogs bool `json:"collectLogs" protobuf:"bytes,3,opt,name=collectLogs"` // Flag to set tell if Polyaxon should sync statuses with control plane // +optional SyncStatuses bool `json:"syncStatuses" protobuf:"bytes,4,opt,name=syncStatuses"` // List of notigications for this operation // +optional Notifications []NotificationSpec `json:"notifications,omitempty" protobuf:"bytes,5,opt,name=notifications"` // Specification of the desired behavior of a job. // +optional BatchJobSpec *BatchJobSpec `json:"batchJobSpec,omitempty" protobuf:"bytes,6,opt,name=batchJobSpec"` // Specification of the desired behavior of a Service. ServiceSpec *ServiceSpec `json:"serviceSpec,omitempty" protobuf:"bytes,7,opt,name=serviceSpec"` // Specification of the desired behavior of a TFJob. TFJobSpec *TFJobSpec `json:"tfJobSpec,omitempty" protobuf:"bytes,8,opt,name=batchJobSpec"` // Specification of the desired behavior of a PytorchJob. PytorchJobSpec *PytorchJobSpec `json:"pytorchJobSpec,omitempty" protobuf:"bytes,9,opt,name=pytorchJobSpec"` // Specification of the desired behavior of a MPIJob. MPIJobSpec *MPIJobSpec `json:"mpiJobSpec,omitempty" protobuf:"bytes,10,opt,name=mpiJobSpec"` // Current status of an op. // +optional Status OperationStatus `json:"status,omitempty" protobuf:"bytes,11,opt,name=status"` }
Operation is the Schema for the operations API +k8s:openapi-gen=true +kubebuilder:resource:shortName=op +kubebuilder:subresource:status
func (*Operation) AddLogsFinalizer ¶
func (instance *Operation) AddLogsFinalizer()
AddLogsFinalizer handler for Operation
func (*Operation) AddNotificationsFinalizer ¶
func (instance *Operation) AddNotificationsFinalizer()
AddNotificationsFinalizer handler for Operation
func (*Operation) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Operation.
func (*Operation) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Operation) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Operation) HasLogsFinalizer ¶
HasLogsFinalizer check for Operation
func (*Operation) HasNotificationsFinalizer ¶
HasNotificationsFinalizer check for Operation
func (*Operation) HasWarning ¶
HasWarning checks if the Operation succeeded
func (*Operation) IsBeingDeleted ¶
IsBeingDeleted checks if the job is being deleted
func (*Operation) IsStarting ¶
IsStarting checks if the Operation is statrting
func (*Operation) IsSucceeded ¶
IsSucceeded checks if the Operation succeeded
func (*Operation) LogRunning ¶
LogRunning sets Operation to running
func (*Operation) LogStarting ¶
LogStarting sets Operation to statrting
func (*Operation) LogStopped ¶
LogStopped sets Operation to stopped
func (*Operation) LogSucceeded ¶
LogSucceeded sets Operation to succeeded
func (*Operation) LogWarning ¶
LogWarning sets Operation to succeeded
func (*Operation) RemoveLogsFinalizer ¶
func (instance *Operation) RemoveLogsFinalizer()
RemoveLogsFinalizer handler for Operation
func (*Operation) RemoveNotificationsFinalizer ¶
func (instance *Operation) RemoveNotificationsFinalizer()
RemoveNotificationsFinalizer handler for Operation
type OperationCondition ¶
type OperationCondition struct { // Type is the type of the condition. Type OperationConditionType `json:"type" protobuf:"bytes,1,opt,name=type"` // Status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status" protobuf:"bytes,2,opt,name=status"` // The last time this condition was updated. // +optional LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty" protobuf:"bytes,3,opt,name=lastUpdateTime"` // Last time the condition transitioned. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" protobuf:"bytes,4,opt,name=lastTransitionTime"` // The reason for this container condition. // +optional Reason string `json:"reason,omitempty" protobuf:"bytes,5,opt,name=reason"` // A human readable message indicating details about the transition. // +optional Message string `json:"message,omitempty" protobuf:"bytes,6,opt,name=message"` }
OperationCondition defines the conditions of Operation or OpService +k8s:openapi-gen=true
func NewOperationCondition ¶
func NewOperationCondition(conditionType OperationConditionType, status corev1.ConditionStatus, reason, message string) OperationCondition
NewOperationCondition makes a new instance of OperationCondition
func (*OperationCondition) DeepCopy ¶
func (in *OperationCondition) DeepCopy() *OperationCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperationCondition.
func (*OperationCondition) DeepCopyInto ¶
func (in *OperationCondition) DeepCopyInto(out *OperationCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OperationConditionType ¶
type OperationConditionType string
OperationConditionType maps the conditions of a job or service once deployed +k8s:openapi-gen=true
const ( // OperationStarting means underlaying Operation has started. OperationStarting OperationConditionType = "Starting" // OperationRunning means underlaying Operation is running, OperationRunning OperationConditionType = "Running" // OperationWarning means underlaying Operation has some issues. OperationWarning OperationConditionType = "Warning" // OperationSucceeded means underlaying Operation has completed successfully. OperationSucceeded OperationConditionType = "Succeeded" // OperationFailed means underlaying Operation has failed. OperationFailed OperationConditionType = "Failed" // OperationStopped means that the Operation was stopped/killed. OperationStopped OperationConditionType = "Stopped" )
type OperationList ¶
type OperationList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Operation `json:"items"` }
OperationList contains a list of Operation
func (*OperationList) DeepCopy ¶
func (in *OperationList) DeepCopy() *OperationList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperationList.
func (*OperationList) DeepCopyInto ¶
func (in *OperationList) DeepCopyInto(out *OperationList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OperationList) DeepCopyObject ¶
func (in *OperationList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OperationStatus ¶
type OperationStatus struct { // The latest available observations of an object's current state. // +optional // +patchMergeKey=type // +patchStrategy=merge Conditions []OperationCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"` // Represents the time when the job was acknowledged by the controller. // It is not guaranteed to be set in happens-before order across separate operations. // It is represented in RFC3339 form and is in UTC. StartTime *metav1.Time `json:"startTime,omitempty" protobuf:"bytes,2,opt,name=startTime"` // Represents the time when the job was completed. It is not guaranteed to // be set in happens-before order across separate operations. // It is represented in RFC3339 form and is in UTC. CompletionTime *metav1.Time `json:"completionTime,omitempty" protobuf:"bytes,3,opt,name=startTime"` // Represents the last time when the job was reconciled. // It is not guaranteed to be set in happens-before order across separate operations. // It is represented in RFC3339 form and is in UTC. LastReconcileTime *metav1.Time `json:"lastReconcileTime,omitempty" protobuf:"bytes,4,opt,name=startTime"` }
OperationStatus defines the observed state of a job or a service +k8s:openapi-gen=true
func (*OperationStatus) DeepCopy ¶
func (in *OperationStatus) DeepCopy() *OperationStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperationStatus.
func (*OperationStatus) DeepCopyInto ¶
func (in *OperationStatus) DeepCopyInto(out *OperationStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OperationTriggerNotificationType ¶
type OperationTriggerNotificationType string
OperationTriggerNotificationType maps the notifiable conditions +k8s:openapi-gen=true
const ( // OperationSucceededTrigger means underlaying Operation has completed successfully. OperationSucceededTrigger OperationTriggerNotificationType = "Succeeded" // OperationFailedTrigger means underlaying Operation has failed. OperationFailedTrigger OperationTriggerNotificationType = "Failed" // OperationStoppedTrigger means that the Operation was stopped/killed. OperationStoppedTrigger OperationTriggerNotificationType = "Stopped" // OperationDoneTrigger means that the Operation was stopped/killed. OperationDoneTrigger OperationTriggerNotificationType = "Done" )
type PyTorchReplicaType ¶
type PyTorchReplicaType string
PyTorchReplicaType is the type for PyTorchReplica. Can be one of "Master" or "Worker".
const ( // PyTorchReplicaTypeMaster is the type of Master of distributed PyTorch PyTorchReplicaTypeMaster PyTorchReplicaType = "Master" // PyTorchReplicaTypeWorker is the type for workers of distributed PyTorch. PyTorchReplicaTypeWorker PyTorchReplicaType = "Worker" )
type PytorchJobSpec ¶
type PytorchJobSpec struct { // Defines the policy for cleaning up pods after the Job completes. // Defaults to Running. CleanPodPolicy *CleanPodPolicy `json:"cleanPodPolicy,omitempty" protobuf:"bytes,1,opt,name=cleanPodPolicy"` // A map of PyTorchReplicaType (type) to ReplicaSpec (value). Specifies the PyTorch cluster configuration. // For example, // { // "Master": PyTorchReplicaSpec, // "Worker": PyTorchReplicaSpec, // } ReplicaSpecs map[PyTorchReplicaType]KFReplicaSpec `json:"replicaSpecs" protobuf:"bytes,2,opt,name=replicaSpecs"` }
PytorchJobSpec defines the desired state of a pytorch job +k8s:openapi-gen=true
func (*PytorchJobSpec) DeepCopy ¶
func (in *PytorchJobSpec) DeepCopy() *PytorchJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PytorchJobSpec.
func (*PytorchJobSpec) DeepCopyInto ¶
func (in *PytorchJobSpec) DeepCopyInto(out *PytorchJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ServiceSpec ¶
type ServiceSpec struct { // Replicas is the number of desired replicas. // This is a pointer to distinguish between explicit zero and unspecified. // Defaults to 1. // +optional Replicas *int32 `json:"replicas,omitempty" default:"1" protobuf:"varint,1,opt,name=replicas"` // optional // List of ports to expose on the service Ports []int32 `json:"ports,omitempty" protobuf:"varint,2,rep,name=ports"` // Template describes the pods that will be created. Template corev1.PodTemplateSpec `json:"template" protobuf:"bytes,3,opt,name=template"` }
ServiceSpec defines the desired state of a service +k8s:openapi-gen=true
func (*ServiceSpec) DeepCopy ¶
func (in *ServiceSpec) DeepCopy() *ServiceSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceSpec.
func (*ServiceSpec) DeepCopyInto ¶
func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SparkApplicationType ¶
type SparkApplicationType string
SparkApplicationType describes the type of a Spark application.
const ( SparkJavaApplicationType SparkApplicationType = "Java" SparkScalaApplicationType SparkApplicationType = "Scala" SparkPythonApplicationType SparkApplicationType = "Python" SparkRApplicationType SparkApplicationType = "R" )
Different types of Spark applications.
type SparkDeployMode ¶
type SparkDeployMode string
SparkDeployMode describes the type of deployment of a Spark application.
const ( SparkClusterMode SparkDeployMode = "cluster" SparkClientMode SparkDeployMode = "client" SparkInClusterClientMode SparkDeployMode = "in-cluster-client" )
Different types of deployments.
type SparkJobSpec ¶
type SparkJobSpec struct { // Type tells the type of the Spark application. // +kubebuilder:validation:Enum={Java,Python,Scala,R} Type SparkApplicationType `json:"type" protobuf:"bytes,1,opt,name=type"` // SparkVersion is the version of Spark the application uses. SparkVersion string `json:"sparkVersion" protobuf:"bytes,2,opt,name=sparkVersion"` // Mode is the deployment mode of the Spark application. // +kubebuilder:validation:Enum={cluster,client} Mode SparkDeployMode `json:"mode,omitempty" protobuf:"bytes,3,opt,name=mode"` // MainClass is the fully-qualified main class of the Spark application. // This only applies to Java/Scala Spark applications. // +optional MainClass *string `json:"mainClass,omitempty" protobuf:"bytes,4,opt,name=mainClass"` // MainFile is the path to a bundled JAR, Python, or R file of the application. // +optional MainApplicationFile *string `json:"mainApplicationFile" protobuf:"bytes,5,opt,name=mainApplicationFile"` // Arguments is a list of arguments to be passed to the application. // +optional Arguments []string `json:"arguments,omitempty" protobuf:"bytes,6,opt,name=arguments"` // SparkConf carries user-specified Spark configuration properties as they would use the "--conf" option in // spark-submit. // +optional SparkConf map[string]string `json:"sparkConf,omitempty" protobuf:"bytes,7,opt,name=sparkConf"` // HadoopConf carries user-specified Hadoop configuration properties as they would use the the "--conf" option // in spark-submit. The SparkApplication controller automatically adds prefix "spark.hadoop." to Hadoop // configuration properties. // +optional HadoopConf map[string]string `json:"hadoopConf,omitempty" protobuf:"bytes,8,opt,name=hadoopConf"` // SparkConfigMap carries the name of the ConfigMap containing Spark configuration files such as log4j.properties. // The controller will add environment variable SPARK_CONF_DIR to the path where the ConfigMap is mounted to. // +optional SparkConfigMap *string `json:"sparkConfigMap,omitempty" protobuf:"bytes,9,opt,name=sparkConfigMap"` // HadoopConfigMap carries the name of the ConfigMap containing Hadoop configuration files such as core-site.xml. // The controller will add environment variable HADOOP_CONF_DIR to the path where the ConfigMap is mounted to. // +optional HadoopConfigMap *string `json:"hadoopConfigMap,omitempty" protobuf:"bytes,10,opt,name=hadoopConfigMap"` // Volumes is the list of Kubernetes volumes that can be mounted by the driver and/or executors. // +optional Volumes []corev1.Volume `json:"volumes,omitempty" protobuf:"bytes,11,opt,name=volumes"` // Spark executor definition Executor SparkReplicaSpec `json:"executor" protobuf:"bytes,12,opt,name=executor"` // Spark driver definition Driver SparkReplicaSpec `json:"driver" protobuf:"bytes,13,opt,name=driver"` }
SparkJobSpec defines the desired state of a spark job +k8s:openapi-gen=true
func (*SparkJobSpec) DeepCopy ¶
func (in *SparkJobSpec) DeepCopy() *SparkJobSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SparkJobSpec.
func (*SparkJobSpec) DeepCopyInto ¶
func (in *SparkJobSpec) DeepCopyInto(out *SparkJobSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SparkReplicaSpec ¶
type SparkReplicaSpec struct { // Replicas is the desired number of replicas of the given template. // If unspecified, defaults to 1. Replicas *int32 `json:"replicas,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 corev1.PodTemplateSpec `json:"template,omitempty"` }
SparkReplicaSpec is a description of a spark replica +k8s:openapi-gen=true
func (*SparkReplicaSpec) DeepCopy ¶
func (in *SparkReplicaSpec) DeepCopy() *SparkReplicaSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SparkReplicaSpec.
func (*SparkReplicaSpec) DeepCopyInto ¶
func (in *SparkReplicaSpec) DeepCopyInto(out *SparkReplicaSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TFJobSpec ¶
type TFJobSpec struct { // Defines the policy for cleaning up pods after the Job completes. // Defaults to Running. CleanPodPolicy *CleanPodPolicy `json:"cleanPodPolicy,omitempty" protobuf:"bytes,1,opt,name=cleanPodPolicy"` // A map of TFReplicaType (type) to ReplicaSpec (value). Specifies the TF cluster configuration. // For example, // { // "PS": ReplicaSpec, // "Worker": ReplicaSpec, // } ReplicaSpecs map[TFReplicaType]KFReplicaSpec `json:"replicaSpecs" protobuf:"bytes,2,opt,name=replicaSpecs"` }
TFJobSpec defines the desired state of a tf job +k8s:openapi-gen=true
func (*TFJobSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TFJobSpec.
func (*TFJobSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TFReplicaType ¶
type TFReplicaType string
TFReplicaType is the type for TFReplica. Can be one of: "Chief"/"Master" (semantically equivalent), "Worker", "PS", or "Evaluator".
const ( // TFReplicaTypePS is the type for parameter servers of distributed TensorFlow. TFReplicaTypePS TFReplicaType = "PS" // TFReplicaTypeWorker is the type for workers of distributed TensorFlow. // This is also used for non-distributed TensorFlow. TFReplicaTypeWorker TFReplicaType = "Worker" // TFReplicaTypeChief is the type for chief worker of distributed TensorFlow. // If there is "chief" replica type, it's the "chief worker". // Else, worker:0 is the chief worker. TFReplicaTypeChief TFReplicaType = "Chief" // TFReplicaTypeMaster is the type for master worker of distributed TensorFlow. // This is similar to chief, and kept just for backwards compatibility. TFReplicaTypeMaster TFReplicaType = "Master" // TFReplicaTypeEval is the type for evaluation replica in TensorFlow. TFReplicaTypeEval TFReplicaType = "Evaluator" )
type TerminationSpec ¶
type TerminationSpec struct { // Specifies the number of retries before marking this job failed. // Defaults to 1 // +optional BackoffLimit *int32 `json:"backoffLimit,omitempty" default:"1" protobuf:"varint,1,opt,name=backoffLimit"` // Specifies the duration (in seconds) since startTime during which the job can remain active // before it is terminated. Must be a positive integer. // This setting applies only to pods where restartPolicy is OnFailure or Always. // +optional ActiveDeadlineSeconds *int64 `json:"activeDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=activeDeadlineSeconds"` // ttlSecondsAfterFinished limits the lifetime of a Job that has finished // execution (either Complete or Failed). If this field is set, // ttlSecondsAfterFinished after the Job finishes, it is eligible to be // automatically deleted. When the Job is being deleted, its lifecycle // guarantees (e.g. finalizers) will be honored. If this field is unset, // the Job won't be automatically deleted. If this field is set to zero, // the Job becomes eligible to be deleted immediately after it finishes. // This field is alpha-level and is only honored by servers that enable the // TTLAfterFinished feature. // TODO: (Cleanup logic once kubernetes adds the cleanup controller) // +optional TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty" protobuf:"varint,3,opt,name=ttlSecondsAfterFinished"` }
TerminationSpec defines the desired termination specification for handliong timeout, retries, and ttl +k8s:openapi-gen=true
func (*TerminationSpec) DeepCopy ¶
func (in *TerminationSpec) DeepCopy() *TerminationSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TerminationSpec.
func (*TerminationSpec) DeepCopyInto ¶
func (in *TerminationSpec) DeepCopyInto(out *TerminationSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.