REST Resource: namespaces.workerpools

Resource: WorkerPool

WorkerPool acts as a top-level container that manages a set instance splits among a set of Revisions and a template for creating new Revisions.

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

string

The API version for this call. It must be "run.googleapis.com/v1".

kind

string

The kind of resource. It must be "WorkerPool".

metadata

object (ObjectMeta)

Metadata associated with this WorkerPool, including name, namespace, labels, and annotations.

In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type.

The following Cloud Run-specific annotations are accepted in WorkerPool.metadata.annotations.

  • run.googleapis.com/binary-authorization-breakglass
  • run.googleapis.com/binary-authorization
  • run.googleapis.com/client-name
  • run.googleapis.com/description
spec

object (WorkerPoolSpec)

Holds the desired state of the WorkerPool (from the client).

status

object (WorkerPoolStatus)

Communicates the system-controlled state of the WorkerPool.

WorkerPoolSpec

WorkerPoolSpec holds the desired state of the WorkerPool's template and instance splits.

JSON representation
{
  "template": {
    object (RevisionTemplate)
  },
  "instanceSplits": [
    {
      object (InstanceSplit)
    }
  ]
}
Fields
template

object (RevisionTemplate)

Holds the latest specification for the Revision to be stamped out.

instanceSplits[]

object (InstanceSplit)

Specifies how to distribute instances over a collection of Revisions.

InstanceSplit

Holds a single instance split entry for the Worker. Allocations can be done to a specific Revision name, or pointing to the latest Ready Revision.

JSON representation
{
  "percent": integer,

  // Union field target can be only one of the following:
  "revisionName": string,
  "latestRevision": boolean
  // End of list of possible types for union field target.
}
Fields
percent

integer

Specifies percent of the instance split to this Revision. This defaults to zero if unspecified.

Union field target. The target of this instance split. target can be only one of the following:
revisionName

string

Revision to which to assign this portion of instances.

latestRevision

boolean

Uses the "status.latestReadyRevisionName" to determine the traffic target. When it changes, traffic will automatically migrate from the prior "latest ready" revision to the new one.

WorkerPoolStatus

The current state of the WorkerPool. Output only.

JSON representation
{
  "observedGeneration": integer,
  "conditions": [
    {
      object (Condition)
    }
  ],
  "latestReadyRevisionName": string,
  "latestCreatedRevisionName": string,
  "instanceSplits": [
    {
      object (InstanceSplit)
    }
  ]
}
Fields
observedGeneration

integer

Returns the generation last seen by the system. Clients polling for completed reconciliation should poll until observedGeneration = metadata.generation and the Ready condition's status is True or False.

conditions[]

object (Condition)

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

  • Ready: True when all underlying resources are ready.
latestReadyRevisionName

string

Name of the latest Revision from this WorkerPool's template that has had its Ready condition become True.

latestCreatedRevisionName

string

Name of the last revision that was created from this WorkerPool's template. It might not be ready yet, for that use LatestReadyRevisionName.

instanceSplits[]

object (InstanceSplit)

Holds the configured traffic distribution. These entries will always contain RevisionName references. When ConfigurationName appears in the spec, this will hold the LatestReadyRevisionName that we last observed.

Methods

create

Creates a new WorkerPool.

delete

Deletes the provided worker pool.

get

Gets information about a worker pool.

list

Lists worker pools for the given project and region.

replaceWorkerPool

Replaces a worker pool.