JobSet API
Resource Types
JobSet
Appears in:
JobSet is the Schema for the jobsets API
Field | Description |
---|---|
apiVersion string | jobset.x-k8s.io/v1alpha2 |
kind string | JobSet |
spec [Required]JobSetSpec
|
No description provided. |
status [Required]JobSetStatus
|
No description provided. |
Coordinator
Appears in:
Coordinator defines which pod can be marked as the coordinator for the JobSet workload.
Field | Description |
---|---|
replicatedJob [Required]string
|
ReplicatedJob is the name of the ReplicatedJob which contains the coordinator pod. |
jobIndex [Required]int
|
JobIndex is the index of Job which contains the coordinator pod (i.e., for a ReplicatedJob with N replicas, there are Job indexes 0 to N-1). |
podIndex [Required]int
|
PodIndex is the Job completion index of the coordinator pod. |
FailurePolicy
Appears in:
Field | Description |
---|---|
maxRestarts [Required]int32
|
MaxRestarts defines the limit on the number of JobSet restarts. A restart is achieved by recreating all active child jobs. |
rules [Required][]FailurePolicyRule
|
List of failure policy rules for this JobSet. For a given Job failure, the rules will be evaluated in order, and only the first matching rule will be executed. If no matching rule is found, the RestartJobSet action is applied. |
FailurePolicyAction
(Alias of string
)
Appears in:
FailurePolicyAction defines the action the JobSet controller will take for a given FailurePolicyRule.
FailurePolicyRule
Appears in:
FailurePolicyRule defines a FailurePolicyAction to be executed if a child job fails due to a reason listed in OnJobFailureReasons.
Field | Description |
---|---|
name [Required]string
|
The name of the failure policy rule. The name is defaulted to 'failurePolicyRuleN' where N is the index of the failure policy rule. The name must match the regular expression "^A-Za-z?$". |
action [Required]FailurePolicyAction
|
The action to take if the rule is matched. |
onJobFailureReasons [Required][]string
|
The requirement on the job failure reasons. The requirement is satisfied if at least one reason matches the list. The rules are evaluated in order, and the first matching rule is executed. An empty list applies the rule to any job failure reason. |
targetReplicatedJobs []string
|
TargetReplicatedJobs are the names of the replicated jobs the operator applies to. An empty list will apply to all replicatedJobs. |
JobSetSpec
Appears in:
JobSetSpec defines the desired state of JobSet
Field | Description |
---|---|
replicatedJobs [Required][]ReplicatedJob
|
ReplicatedJobs is the group of jobs that will form the set. |
network Network
|
Network defines the networking options for the jobset. |
successPolicy [Required]SuccessPolicy
|
SuccessPolicy configures when to declare the JobSet as succeeded. The JobSet is always declared succeeded if all jobs in the set finished with status complete. |
failurePolicy [Required]FailurePolicy
|
FailurePolicy, if set, configures when to declare the JobSet as failed. The JobSet is always declared failed if any job in the set finished with status failed. |
startupPolicy [Required]StartupPolicy
|
StartupPolicy, if set, configures in what order jobs must be started |
suspend [Required]bool
|
Suspend suspends all running child Jobs when set to true. |
coordinator Coordinator
|
Coordinator can be used to assign a specific pod as the coordinator for the JobSet. If defined, an annotation will be added to all Jobs and pods with coordinator pod, which contains the stable network endpoint where the coordinator pod can be reached. jobset.sigs.k8s.io/coordinator=. |
managedBy string
|
ManagedBy is used to indicate the controller or entity that manages a JobSet.
The built-in JobSet controller reconciles JobSets which don't have this
field at all or the field value is the reserved string
The value must be a valid domain-prefixed path (e.g. acme.io/foo) - all characters before the first "/" must be a valid subdomain as defined by RFC 1123. All characters trailing the first "/" must be valid HTTP Path characters as defined by RFC 3986. The value cannot exceed 63 characters. The field is immutable. |
ttlSecondsAfterFinished int32
|
TTLSecondsAfterFinished limits the lifetime of a JobSet that has finished execution (either Complete or Failed). If this field is set, TTLSecondsAfterFinished after the JobSet finishes, it is eligible to be automatically deleted. When the JobSet is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is unset, the JobSet won't be automatically deleted. If this field is set to zero, the JobSet becomes eligible to be deleted immediately after it finishes. |
JobSetStatus
Appears in:
JobSetStatus defines the observed state of JobSet
Field | Description |
---|---|
conditions []k8s.io/apimachinery/pkg/apis/meta/v1.Condition
|
No description provided. |
restarts [Required]int32
|
Restarts tracks the number of times the JobSet has restarted (i.e. recreated in case of RecreateAll policy). |
restartsCountTowardsMax [Required]int32
|
RestartsCountTowardsMax tracks the number of times the JobSet has restarted that counts towards the maximum allowed number of restarts. |
terminalState [Required]string
|
TerminalState the state of the JobSet when it finishes execution. It can be either Complete or Failed. Otherwise, it is empty by default. |
replicatedJobsStatus []ReplicatedJobStatus
|
ReplicatedJobsStatus track the number of JobsReady for each replicatedJob. |
Network
Appears in:
Field | Description |
---|---|
enableDNSHostnames bool
|
EnableDNSHostnames allows pods to be reached via their hostnames. Pods will be reachable using the fully qualified pod hostname: <jobSet.name>-<spec.replicatedJob.name>--. |
subdomain string
|
Subdomain is an explicit choice for a network subdomain name When set, any replicated job in the set is added to this network. Defaults to <jobSet.name> if not set. |
publishNotReadyAddresses bool
|
Indicates if DNS records of pods should be published before the pods are ready. Defaults to True. |
Operator
(Alias of string
)
Appears in:
Operator defines the target of a SuccessPolicy or FailurePolicy.
ReplicatedJob
Appears in:
Field | Description |
---|---|
name [Required]string
|
Name is the name of the entry and will be used as a suffix for the Job name. |
template [Required]k8s.io/api/batch/v1.JobTemplateSpec
|
Template defines the template of the Job that will be created. |
replicas [Required]int32
|
Replicas is the number of jobs that will be created from this ReplicatedJob's template. Jobs names will be in the format: <jobSet.name>-<spec.replicatedJob.name>- |
ReplicatedJobStatus
Appears in:
ReplicatedJobStatus defines the observed ReplicatedJobs Readiness.
Field | Description |
---|---|
name [Required]string
|
Name of the ReplicatedJob. |
ready [Required]int32
|
Ready is the number of child Jobs where the number of ready pods and completed pods is greater than or equal to the total expected pod count for the Job (i.e., the minimum of job.spec.parallelism and job.spec.completions). |
succeeded [Required]int32
|
Succeeded is the number of successfully completed child Jobs. |
failed [Required]int32
|
Failed is the number of failed child Jobs. |
active [Required]int32
|
Active is the number of child Jobs with at least 1 pod in a running or pending state which are not marked for deletion. |
suspended [Required]int32
|
Suspended is the number of child Jobs which are in a suspended state. |
StartupPolicy
Appears in:
Field | Description |
---|---|
startupPolicyOrder [Required]StartupPolicyOptions
|
StartupPolicyOrder determines the startup order of the ReplicatedJobs. AnyOrder means to start replicated jobs in any order. InOrder means to start them as they are listed in the JobSet. A ReplicatedJob is started only when all the jobs of the previous one are ready. |
StartupPolicyOptions
(Alias of string
)
Appears in:
SuccessPolicy
Appears in:
Field | Description |
---|---|
operator [Required]Operator
|
Operator determines either All or Any of the selected jobs should succeed to consider the JobSet successful |
targetReplicatedJobs []string
|
TargetReplicatedJobs are the names of the replicated jobs the operator will apply to. A null or empty list will apply to all replicatedJobs. |