REST Resource: namespaces.jobs

Stay organized with collections Save and categorize content based on your preferences.

Resource: Job

Job represents the configuration of a single job, which references a container image which is run to completion.

JSON representation
{
  "apiVersion": string,
  "kind": string,
  "metadata": {
    object (ObjectMeta)
  },
  "spec": {
    object (JobSpec)
  },
  "status": {
    object (JobStatus)
  }
}
Fields
apiVersion

string

Optional. APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

kind

string

Optional. Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds

metadata

object (ObjectMeta)

Optional. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata

spec

object (JobSpec)

Optional. Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

status

object (JobStatus)

Output only. Current status of a job. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

JobSpec

JobSpec describes how the job will look.

JSON representation
{
  "template": {
    object (ExecutionTemplateSpec)
  }
}
Fields
template

object (ExecutionTemplateSpec)

Optional. Describes the execution that will be created when running a job.

ExecutionTemplateSpec

ExecutionTemplateSpec describes the metadata and spec an Execution should have when created from a job. Based on: https://github.com/kubernetes/api/blob/e771f807/core/v1/types.go#L3179-L3190

JSON representation
{
  "metadata": {
    object (ObjectMeta)
  },
  "spec": {
    object (ExecutionSpec)
  }
}
Fields
metadata

object (ObjectMeta)

Optional. Optional metadata for this Execution, including labels and annotations.

The following annotation keys set properties of the created execution:

  • run.googleapis.com/cloudsql-instances sets Cloud SQL connections. Multiple values should be comma separated.
  • run.googleapis.com/vpc-access-connector sets a Serverless VPC Access connector.
  • run.googleapis.com/vpc-access-egress sets VPC egress. Supported values are all-traffic, all (deprecated), and private-ranges-only. all-traffic and all provide the same functionality. all is deprecated but will continue to be supported. Prefer all-traffic.
spec

object (ExecutionSpec)

Required. ExecutionSpec holds the desired configuration for executions of this job.

JobStatus

JobStatus represents the current state of a Job.

JSON representation
{
  "observedGeneration": integer,
  "conditions": [
    {
      object (Condition)
    }
  ],
  "executionCount": integer,
  "latestCreatedExecution": {
    object (ExecutionReference)
  }
}
Fields
observedGeneration

integer

The 'generation' of the job that was last processed by the controller.

conditions[]

object (Condition)

Conditions communicate information about ongoing/complete reconciliation processes that bring the "spec" inline with the observed state of the world.

Job-specific conditions include:

  • Ready: True when the job is ready to be executed.
executionCount

integer

Number of executions created for this job.

latestCreatedExecution

object (ExecutionReference)

A pointer to the most recently created execution for this job. This is set regardless of the eventual state of the execution.

ExecutionReference

Reference to an Execution. Use /Executions.GetExecution with the given name to get full execution including the latest status.

JSON representation
{
  "name": string,
  "creationTimestamp": string,
  "completionTimestamp": string
}
Fields
name

string

Optional. Name of the execution.

creationTimestamp

string (Timestamp format)

Optional. Creation timestamp of the execution.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

completionTimestamp

string (Timestamp format)

Optional. Completion timestamp of the execution.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

Methods

create

Create a job.

delete

Delete a job.

get

Get information about a job.

list

List jobs.

replaceJob

Replace a job.

run

Trigger creation of a new execution of this job.