Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the batch v1alpha1 API group +kubebuilder:object:generate=true +groupName=batch.cortex.dev
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "batch.cortex.dev", 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 ¶
Types ¶
type BatchJob ¶
type BatchJob struct {
kmeta.TypeMeta `json:",inline"`
kmeta.ObjectMeta `json:"metadata,omitempty"`
Spec BatchJobSpec `json:"spec,omitempty"`
Status BatchJobStatus `json:"status,omitempty"`
}
BatchJob is the Schema for the batchjobs API
func (*BatchJob) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BatchJob.
func (*BatchJob) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BatchJob) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BatchJobList ¶
type BatchJobList struct {
kmeta.TypeMeta `json:",inline"`
kmeta.ListMeta `json:"metadata,omitempty"`
Items []BatchJob `json:"items"`
}
BatchJobList contains a list of BatchJob
func (*BatchJobList) DeepCopy ¶
func (in *BatchJobList) DeepCopy() *BatchJobList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BatchJobList.
func (*BatchJobList) DeepCopyInto ¶
func (in *BatchJobList) DeepCopyInto(out *BatchJobList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BatchJobList) DeepCopyObject ¶
func (in *BatchJobList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type BatchJobSpec ¶
type BatchJobSpec struct {
// +kubebuilder:validation:Required
// Reference to a cortex BatchAPI name
APIName string `json:"api_name,omitempty"`
// +kubebuilder:validation:Required
// Reference to a cortex BatchAPI apiID
APIID string `json:"api_id,omitempty"`
// +kubebuilder:validation:Optional
// +kubebuilder:default=1
// Number of workers for the batch job
Workers int32 `json:"workers,omitempty"`
// +kubebuilder:validation:Optional
// YAML content of the user config
Config *string `json:"config,omitempty"`
// +kubebuilder:validation:Optional
// Duration until a batch job times out
Timeout *kmeta.Duration `json:"timeout,omitempty"`
// +kubebuilder:validation:Optional
// Configuration for the dead letter queue
DeadLetterQueue *DeadLetterQueueSpec `json:"dead_letter_queue,omitempty"`
// +kubebuilder:validation:Optional
// Compute resource requirements
Resources *kcore.ResourceRequirements `json:"resources,omitempty"`
// +kubebuilder:validation:Optional
// +nullable
// Node groups selector
NodeGroups []string `json:"node_groups"`
// +kubebuilder:validation:Optional
// +nullable
// Readiness probes for the job (container name -> probe)
Probes map[string]kcore.Probe `json:"probes"`
// +kubebuilder:validation:Optional
// Time to live for the resource. The controller will clean-up resources
// that reached a final state when the TTL time is exceeded.
TTL *kmeta.Duration `json:"ttl,omitempty"`
}
BatchJobSpec defines the desired state of BatchJob
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 BatchJobStatus ¶
type BatchJobStatus struct {
// Job ID
ID string `json:"id,omitempty"`
// Processing ending timestamp
EndTime *kmeta.Time `json:"end_time,omitempty"`
// URL for the used SQS queue
QueueURL string `json:"queue_url,omitempty"`
// Total batch count
TotalBatchCount int `json:"total_batch_count,omitempty"`
// +kubebuilder:validation:Type=string
// Status of the batch job
Status status.JobCode `json:"status,omitempty"`
// Detailed worker counts with respective status
WorkerCounts *status.WorkerCounts `json:"worker_counts,omitempty"`
}
BatchJobStatus defines the observed state of BatchJob
func (*BatchJobStatus) DeepCopy ¶
func (in *BatchJobStatus) DeepCopy() *BatchJobStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BatchJobStatus.
func (*BatchJobStatus) DeepCopyInto ¶
func (in *BatchJobStatus) DeepCopyInto(out *BatchJobStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type DeadLetterQueueSpec ¶
type DeadLetterQueueSpec struct {
// +kubebuilder:validation:Required
// arn of the dead letter queue e.g. arn:aws:sqs:us-west-2:123456789:failed.fifo
ARN string `json:"arn,omitempty"`
// +kubebuilder:validation:Optional
// +kubebuilder:default=1
// +kubebuilder:validation:Minimum=1
// Number of times a batch is allowed to be handled by a worker before it is considered to be failed
// and transferred to the dead letter queue (must be >= 1)
MaxReceiveCount int32 `json:"max_receive_count,omitempty"`
}
DeadLetterQueueSpec defines the desired state for the dead letter queue in a BatchJob
func (*DeadLetterQueueSpec) DeepCopy ¶
func (in *DeadLetterQueueSpec) DeepCopy() *DeadLetterQueueSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeadLetterQueueSpec.
func (*DeadLetterQueueSpec) DeepCopyInto ¶
func (in *DeadLetterQueueSpec) DeepCopyInto(out *DeadLetterQueueSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EnqueuingStatus ¶
type EnqueuingStatus string
EnqueuingStatus is an enum for the different possible enqueuing status
const ( EnqueuingNotStarted EnqueuingStatus = "not_started" EnqueuingInProgress EnqueuingStatus = "in_progress" EnqueuingDone EnqueuingStatus = "done" EnqueuingFailed EnqueuingStatus = "failed" )
Possible EnqueuingStatus states