A Job is a managed resource that represents an AWS Batch Job.
Type
CRD
Group
batch.aws.crossplane.io
Version
v1alpha1
apiVersion: batch.aws.crossplane.io/v1alpha1
kind: Job
A JobSpec defines the desired state of a Job.
JobParameters define the desired state of a Batch Job
The array properties for the submitted job, such as the size of the array. The array size can be between 2 and 10,000. If you specify array properties for a job, it becomes an array job. For more information, see Array Jobs (https://docs.aws.amazon.com/batch/latest/userguide/array_jobs.html) in the Batch User Guide.
A list of container overrides in the JSON format that specify the name of a container in the specified job definition and the overrides it should receive. You can override the default command for a container, which is specified in the job definition or the Docker image, with a command override. You can also override existing environment variables on a container or add new environment variables to it with an environment override.
The command to send to the container that overrides the default command from the Docker image or the job definition.
The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the job definition.
Environment variables must not start with AWS_BATCH; this naming convention is reserved for variables that are set by the Batch service.
The type and amount of resources to assign to a container. This overrides the settings in the job definition. The supported resources include GPU, MEMORY, and VCPU.
A list of dependencies for the job. A job can depend upon a maximum of 20 jobs. You can specify a SEQUENTIAL type dependency without specifying a job ID for array jobs so that each child array job completes sequentially, starting at index 0. You can also specify an N_TO_N type dependency with a job ID for array jobs. In that case, each index child of this job must wait for the corresponding index child of each dependency to complete before it can begin.
JobIDRef is a reference to an JobID.
Policies for referencing.
JobIDSelector selects references to an JobID.
Policies for selection.
JobDefinitionRef is a reference to an JobDefinition.
Policies for referencing.
JobDefinitionSelector selects references to an JobDefinition.
Policies for selection.
JobQueueRef is a reference to an JobQueue.
Policies for referencing.
JobQueueSelector selects references to an JobQueue.
Policies for selection.
A list of node overrides in JSON format that specify the node range to target and the container overrides for that node range.
This parameter isn't applicable to jobs that are running on Fargate resources; use containerOverrides instead.
The node property overrides for the job.
The overrides that should be sent to a node range.
The command to send to the container that overrides the default command from the Docker image or the job definition.
The environment variables to send to the container. You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the job definition.
Environment variables must not start with AWS_BATCH; this naming convention is reserved for variables that are set by the Batch service.
The type and amount of resources to assign to a container. This overrides the settings in the job definition. The supported resources include GPU, MEMORY, and VCPU.
The retry strategy to use for failed jobs from this SubmitJob operation. When a retry strategy is specified here, it overrides the retry strategy defined in the job definition.
Array of up to 5 objects that specify conditions under which the job should be retried or failed. If this parameter is specified, then the attempts parameter must also be specified.
The timeout configuration for this SubmitJob operation. You can specify a timeout duration after which Batch terminates your jobs if they haven't finished. If a job is terminated due to a timeout, it isn't retried. The minimum value for the timeout is 60 seconds. This configuration overrides any timeout configuration specified in the job definition. For array jobs, child jobs have the same timeout configuration as the parent job. For more information, see Job Timeouts (https://docs.aws.amazon.com/AmazonECS/latest/developerguide/job_timeouts.html) in the Amazon Elastic Container Service Developer Guide.
THIS IS A BETA FIELD. It is on by default but can be opted out through a Crossplane feature flag. ManagementPolicies specify the array of actions Crossplane is allowed to take on the managed and external resources. This field is planned to replace the DeletionPolicy field in a future release. Currently, both could be set independently and non-default values would be honored if the feature flag is enabled. If both are custom, the DeletionPolicy field will be ignored. See the design doc for more information: https://github.com/crossplane/crossplane/blob/499895a25d1a1a0ba1604944ef98ac7a1a71f197/design/design-doc-observe-only-resources.md?plain=1#L223 and this one: https://github.com/crossplane/crossplane/blob/444267e84783136daa93568b364a5f01228cacbe/design/one-pager-ignore-changes.md
ProviderConfigReference specifies how the provider that will be used to create, observe, update, and delete this managed resource should be configured.
Policies for referencing.
PublishConnectionDetailsTo specifies the connection secret config which contains a name, metadata and a reference to secret store config to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource.
WriteConnectionSecretToReference specifies the namespace and name of a Secret to which any connection details for this managed resource should be written. Connection details frequently include the endpoint, username, and password required to connect to the managed resource. This field is planned to be replaced in a future release in favor of PublishConnectionDetailsTo. Currently, both could be set independently and connection details would be published to both without affecting each other.
A JobStatus represents the observed state of a Job.
JobObservation keeps the state for the external resource
The array properties of the job, if it is an array job.
A list of job attempts associated with this job.
Details about the container in this job attempt.
The network interfaces associated with the job attempt.
Conditions of the resource.
example-multinode-job
apiVersion: batch.aws.crossplane.io/v1alpha1
kind: Job
metadata:
name: example-multinode-job
spec:
forProvider:
jobDefinitionRef:
name: example-multinode-jobdefinition
jobQueueRef:
name: example-ec2-jobqueue
nodeOverrides:
nodePropertyOverrides:
- containerOverrides:
command:
- echo
- Thanks world
targetNodes: "0:"
parameters:
para1: valUe1
para2: value2
propagateTags: true
region: us-east-1
retryStrategy:
attempts: 2
tags:
job: my-job
other: bla
providerConfigRef:
name: example
example-job
apiVersion: batch.aws.crossplane.io/v1alpha1
kind: Job
metadata:
name: example-job
spec:
forProvider:
containerOverrides:
command:
- echo
- Thanks world
jobDefinitionRef:
name: example-jobdefinition
jobQueueRef:
name: example-jobqueue
propagateTags: true
region: us-east-1
retryStrategy:
attempts: 2
tags:
job: my-job
other: bla
providerConfigRef:
name: example