1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-22 15:52:30 +00:00

gcloud: Thu Feb 20 10:40:27 UTC 2025

This commit is contained in:
Automated 2025-02-20 10:40:27 +00:00
parent 44f319c56c
commit 8d1a988ab5
295 changed files with 11246 additions and 956 deletions

View file

@ -0,0 +1,68 @@
NAME
gcloud alpha run worker-pools delete - delete a worker-pool
SYNOPSIS
gcloud alpha run worker-pools delete (WORKER_POOL : --region=REGION)
[--async] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Delete a worker-pool.
EXAMPLES
To delete a worker-pool:
$ gcloud alpha run worker-pools delete <worker-pool-name>
POSITIONAL ARGUMENTS
WorkerPool resource - WorkerPool to delete. The arguments in this group
can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other
ways.
To set the project attribute:
◆ provide the argument WORKER_POOL on the command line with a fully
specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
This must be specified.
WORKER_POOL
ID of the WorkerPool or fully qualified identifier for the
WorkerPool.
To set the worker-pool attribute:
▸ provide the argument WORKER_POOL on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Cloud region for the WorkerPool. Overrides the default run/region
property value for this command invocation.
To set the region attribute:
▸ provide the argument WORKER_POOL on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property run/region.
FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,
--help, --impersonate-service-account, --log-http, --project, --quiet,
--trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist.

View file

@ -0,0 +1,499 @@
NAME
gcloud alpha run worker-pools deploy - create or update a Cloud Run
worker-pool
SYNOPSIS
gcloud alpha run worker-pools deploy [[WORKER_POOL] --region=REGION]
[--async] [--breakglass=JUSTIFICATION] [--container=CONTAINER]
[--description=DESCRIPTION] [--max=MAX] [--max-surge=MAX_SURGE]
[--max-unavailable=MAX_UNAVAILABLE] [--mesh=MESH] [--min=MIN]
[--no-promote] [--remove-containers=[CONTAINER,...]]
[--revision-suffix=REVISION_SUFFIX] [--scaling=SCALING]
[--service-account=SERVICE_ACCOUNT] [--vpc-egress=VPC_EGRESS]
[--add-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
| --clear-cloudsql-instances
| --remove-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
| --set-cloudsql-instances=[CLOUDSQL-INSTANCES,...]]
[--add-volume=[KEY=VALUE,...]
--clear-volumes --remove-volume=[VOLUME,...]]
[--add-volume-mount=[volume=NAME,mount-path=MOUNT_PATH,...]
--args=[ARG,...] --clear-volume-mounts --command=[COMMAND,...]
--cpu=CPU --depends-on=[CONTAINER,...] --memory=MEMORY
--remove-volume-mount=[MOUNT_PATH,...] --clear-env-vars
| --env-vars-file=FILE_PATH | --set-env-vars=[KEY=VALUE,...]
| --remove-env-vars=[KEY,...]
--update-env-vars=[KEY=VALUE,...] --clear-secrets
| --set-secrets=[KEY=VALUE,...] | --remove-secrets=[KEY,...]
--update-secrets=[KEY=VALUE,...] --image=IMAGE | --source=SOURCE]
[--binary-authorization=POLICY | --clear-binary-authorization]
[--clear-encryption-key-shutdown-hours
| --encryption-key-shutdown-hours=ENCRYPTION_KEY_SHUTDOWN_HOURS]
[--clear-key | --key=KEY]
[--clear-labels | --remove-labels=[KEY,...] --labels=[KEY=VALUE,...]
| --update-labels=[KEY=VALUE,...]]
[--clear-network
| --network=NETWORK --subnet=SUBNET --clear-network-tags
| --network-tags=[TAG,...]]
[--clear-post-key-revocation-action-type
| --post-key-revocation-action-type=POST_KEY_REVOCATION_ACTION_TYPE]
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Creates or updates a Cloud Run worker-pool.
EXAMPLES
To deploy a container to the worker-pool my-backend on Cloud Run:
$ gcloud alpha run worker-pools deploy my-backend \
--image=us-docker.pkg.dev/project/image
You may also omit the worker-pool name. Then a prompt will be displayed
with a suggested default value:
$ gcloud alpha run worker-pools deploy \
--image=us-docker.pkg.dev/project/image
POSITIONAL ARGUMENTS
WorkerPool resource - WorkerPool to deploy to. The arguments in this group
can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other
ways.
To set the project attribute:
◆ provide the argument WORKER_POOL on the command line with a fully
specified name;
◆ specify the workerpool name from an interactive prompt with a fully
specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
[WORKER_POOL]
ID of the WorkerPool or fully qualified identifier for the
WorkerPool.
To set the worker-pool attribute:
▸ provide the argument WORKER_POOL on the command line;
▸ specify the workerpool name from an interactive prompt.
--region=REGION
The Cloud region for the WorkerPool. Overrides the default run/region
property value for this command invocation.
To set the region attribute:
▸ provide the argument WORKER_POOL on the command line with a fully
specified name;
▸ specify the workerpool name from an interactive prompt with a
fully specified name;
▸ provide the argument --region on the command line;
▸ set the property run/region.
FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
--breakglass=JUSTIFICATION
Justification to bypass Binary Authorization policy constraints and
allow the operation. See
https://cloud.google.com/binary-authorization/docs/using-breakglass for
more information. Next update or deploy command will automatically
clear existing breakglass justification.
--container=CONTAINER
Specifies a container by name. Flags following --container will apply
to the specified container.
--description=DESCRIPTION
Provides an optional, human-readable description of the service.
--max=MAX
The maximum number of container instances to run for this WorkerPool or
'default' to use system default of 100. This instance limit will be
divided among all Revisions receiving a percentage of instance
assignments and can be modified without deploying a new Revision.
--max-surge=MAX_SURGE
A maximum percentage of instances that will be moved in each step of
instance split changes. Use "default" to unset the limit and use the
platform default.
--max-unavailable=MAX_UNAVAILABLE
A maximum percentage of instances that may be unavailable during
instance split changes. Use "default" to unset the limit and use the
platform default.
--mesh=MESH
Enables Cloud Service Mesh using the specified mesh resource name. Mesh
resource name must be in the format of
projects/PROJECT/locations/global/meshes/MESH_NAME or MESH_NAME. Will
default to the current project if only MESH_NAME is provided.
--min=MIN
The minimum number of container instances to run for this WorkerPool or
'default' to use system default of 1. These instances will be divided
among all Revisions receiving a percentage of instance assignments and
can be modified without deploying a new Revision.
--no-promote
True to avoid assign instances to the worker revision being deployed.
Setting this flag assigns any instances assigned to the LATEST revision
to the specific revision bound to LATEST before the deployment. The
effect is that the revision being deployed will not receive instance
split.
After a deployment with this flag the LATEST revision will not receive
instances on future deployments. To restore assinging instances to the
LATEST revision by default, run the gcloud run workers
update-instance-split command with --to-latest.
--remove-containers=[CONTAINER,...]
List of containers to remove.
--revision-suffix=REVISION_SUFFIX
Specify the suffix of the revision name. Revision names always start
with the service name automatically. For example, specifying
[--revision-suffix=v1] for a service named 'helloworld', would lead to
a revision named 'helloworld-v1'. Set empty string to clear the suffix
and resume server-assigned naming.
--scaling=SCALING
The scaling mode to use for this resource. Flag value could be either
"auto" for automatic scaling, or a positive integer to configure manual
scaling with the given integer as a fixed instance count.
--service-account=SERVICE_ACCOUNT
the email address of an IAM service account associated with the
revision of the service. The service account represents the identity of
the running revision, and determines what permissions the revision has.
--vpc-egress=VPC_EGRESS
Specify which of the outbound traffic to send through Direct VPC egress
or the VPC connector for this resource. This resource must have Direct
VPC egress enabled or a VPC connector to set this flag. VPC_EGRESS must
be one of:
all
(DEPRECATED) Sends all outbound traffic through Direct VPC egress
or the VPC connector. Provides the same functionality as
'all-traffic'. Prefer to use 'all-traffic' instead.
all-traffic
Sends all outbound traffic through Direct VPC egress or the VPC
connector.
private-ranges-only
Default option. Sends outbound traffic to private IP addresses (RFC
1918 and Private Google Access IPs) through Direct VPC egress or
the VPC connector.
Traffic to other Cloud Run services might require additional
configuration. See
https://cloud.google.com/run/docs/securing/private-networking#send_requests_to_other_services_and_services
for more information.
These flags modify the Cloud SQL instances this WorkerPool connects to.
You can specify a name of a Cloud SQL instance if it's in the same project
and region as your Cloud Run worker pool; otherwise specify
<project>:<region>:<instance> for the instance.
At most one of these can be specified:
--add-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
Append the given values to the current Cloud SQL instances.
--clear-cloudsql-instances
Empty the current Cloud SQL instances.
--remove-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
Remove the given values from the current Cloud SQL instances.
--set-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
Completely replace the current Cloud SQL instances with the given
values.
--add-volume=[KEY=VALUE,...]
Adds a volume to the Cloud Run resource. To add more than one volume,
specify this flag multiple times. Volumes must have a name and type
key. Only certain values are supported for type. Depending on the
provided type, other keys will be required. The following types are
supported with the specified additional keys:
cloud-storage: A volume representing a Cloud Storage bucket. This
volume type is mounted using Cloud Storage FUSE. See
https://cloud.google.com/storage/docs/gcs-fuse for the details and
limitations of this filesystem. Additional keys:
◆ readonly: (optional) A boolean. If true, this volume will be
read-only from all mounts.
◆ mount-options: (optional) A list of flags to pass to GCSFuse. Flags
should be specified without leading dashes and separated by
semicolons.
◆ bucket: (optional) the name of the bucket to use as the source of
this volume.
◆ dynamic-mounting: (optional) A boolean. If true, the volume will be
mounted dynamically. Note: You will either need to specify a bucket
or set dynamic-mounting to true, but not both.
in-memory: An ephemeral volume that stores data in the instance's
memory. With this type of volume, data is not shared between instances
and all data will be lost when the instance it is on is terminated.
Additional keys:
◆ size-limit: (optional) A quantity representing the maximum amount
of memory allocated to this volume, such as "512Mi" or "3G". Data
stored in an in-memory volume consumes the memory allocation of the
container that wrote the data. If size-limit is not specified, the
maximum size will be half the total memory limit of all containers.
nfs: Represents a volume backed by an NFS server. Additional keys:
◆ location: (required) The location of the NFS Server, in the form
SERVER:/PATH
◆ readonly: (optional) A boolean. If true, this volume will be
read-only from all mounts.
secret: Represents a secret stored in Secret Manager as a volume.
Additional keys:
◆ secret: (required) The name of the secret in Secret Manager. Must
be a secret in the same project being deployed or be an alias mapped
in the run.googleapis.com/secrets annotation.
◆ version: (required) The version of the secret to make available in
the volume.
◆ path: (required) The relative path within the volume to mount that
version.
--clear-volumes
Remove all existing volumes from the Cloud Run resource, including
volumes mounted as secrets
--remove-volume=[VOLUME,...]
Removes volumes from the Cloud Run resource.
Container Flags
The following flags apply to the container.
--add-volume-mount=[volume=NAME,mount-path=MOUNT_PATH,...]
Adds a mount to the current container. Must contain the keys
volume=NAME and mount-path=/PATH where NAME is the name of a volume
on this resource and PATH is the path within the container's
filesystem to mount this volume.
--args=[ARG,...]
Comma-separated arguments passed to the command run by the
container image. If not specified and no '--command' is provided,
the container image's default Cmd is used. Otherwise, if not
specified, no arguments are passed. To reset this field to its
default, pass an empty string.
--clear-volume-mounts
Remove all existing mounts from the current container.
--command=[COMMAND,...]
Entrypoint for the container image. If not specified, the container
image's default Entrypoint is run. To reset this field to its
default, pass an empty string.
--cpu=CPU
Set a CPU limit in Kubernetes cpu units.
Cloud Run supports values fractional values below 1, 1, 2, 4, and
8. Some CPU values requires a minimum Memory --memory value.
--depends-on=[CONTAINER,...]
List of container dependencies to add to the current container.
--memory=MEMORY
Set a memory limit. Ex: 1024Mi, 4Gi.
--remove-volume-mount=[MOUNT_PATH,...]
Removes the volume mounted at the specified path from the current
container.
At most one of these can be specified:
--clear-env-vars
Remove all environment variables.
--env-vars-file=FILE_PATH
Path to a local YAML file with definitions for all environment
variables. All existing environment variables will be removed
before the new environment variables are added. Example YAML
content:
KEY_1: "value1"
KEY_2: "value 2"
--set-env-vars=[KEY=VALUE,...]
List of key-value pairs to set as environment variables. All
existing environment variables will be removed first.
Only --update-env-vars and --remove-env-vars can be used together.
If both are specified, --remove-env-vars will be applied first.
--remove-env-vars=[KEY,...]
List of environment variables to be removed.
--update-env-vars=[KEY=VALUE,...]
List of key-value pairs to set as environment variables.
Specify secrets to provide as environment variables. For example:
'--set-secrets=ENV=mysecret:latest,OTHER_ENV=othersecret:1' will
create an environment variable named ENV whose value is the latest
version of secret 'mysecret' and an environment variable OTHER_ENV
whose value is version of 1 of secret 'othersecret'.
At most one of these can be specified:
--clear-secrets
Remove all secrets.
--set-secrets=[KEY=VALUE,...]
List of key-value pairs to set as secrets. All existing secrets
will be removed first.
Only --update-secrets and --remove-secrets can be used together. If
both are specified, --remove-secrets will be applied first.
--remove-secrets=[KEY,...]
List of secrets to be removed.
--update-secrets=[KEY=VALUE,...]
List of key-value pairs to set as secrets.
At most one of these can be specified:
--image=IMAGE
Name of the container image to deploy (e.g.
us-docker.pkg.dev/cloudrun/container/hello:latest).
--source=SOURCE
The location of the source to build. If a Dockerfile is present
in the source code directory, it will be built using that
Dockerfile, otherwise it will use Google Cloud buildpacks. See
https://cloud.google.com/run/docs/deploying-source-code for more
details. The location can be a directory on a local disk or a
gzipped archive file (.tar.gz) in Google Cloud Storage. If the
source is a local directory, this command skips the files
specified in the --ignore-file. If --ignore-file is not
specified, use .gcloudignore file. If a .gcloudignore file is
absent and a .gitignore file is present in the local source
directory, gcloud will use a generated Git-compatible
.gcloudignore file that respects your .gitignored files. The
global .gitignore is not respected. For more information on
.gcloudignore, see gcloud topic gcloudignore.
At most one of these can be specified:
--binary-authorization=POLICY
Binary Authorization policy to check against. This must be set to
"default".
--clear-binary-authorization
Remove any previously set Binary Authorization policy.
At most one of these can be specified:
--clear-encryption-key-shutdown-hours
Remove any previously set CMEK key shutdown hours setting.
--encryption-key-shutdown-hours=ENCRYPTION_KEY_SHUTDOWN_HOURS
The number of hours to wait before an automatic shutdown server after
CMEK key revocation is detected.
At most one of these can be specified:
--clear-key
Remove any previously set CMEK key reference.
--key=KEY
CMEK key reference to encrypt the container with.
At most one of these can be specified:
--clear-labels
Remove all labels. If --update-labels is also specified then
--clear-labels is applied first.
For example, to remove all labels:
$ gcloud alpha run worker-pools deploy --clear-labels
To remove all existing labels and create two new labels, foo and baz:
$ gcloud alpha run worker-pools deploy --clear-labels \
--update-labels foo=bar,baz=qux
--remove-labels=[KEY,...]
List of label keys to remove. If a label does not exist it is
silently ignored. If --update-labels is also specified then
--update-labels is applied first.
At most one of these can be specified:
--labels=[KEY=VALUE,...]
List of label KEY=VALUE pairs to add.
An alias to --update-labels.
--update-labels=[KEY=VALUE,...]
List of label KEY=VALUE pairs to update. If a label exists, its value
is modified. Otherwise, a new label is created.
At most one of these can be specified:
--clear-network
Disconnect this Cloud Run worker from the VPC network it is connected
to.
Direct VPC egress setting flags group.
--network=NETWORK
The VPC network that the Cloud Run worker will be able to send
traffic to. If --subnet is also specified, subnet must be a
subnetwork of the network specified by this --network flag. To
clear existing VPC network settings, use --clear-network.
--subnet=SUBNET
The VPC subnetwork that the Cloud Run worker will get IPs from. The
subnetwork must be /26 or larger. If --network is also specified,
subnet must be a subnetwork of the network specified by the
--network flag. If --network is not specified, network will be
looked up from this subnetwork. To clear existing VPC network
settings, use --clear-network.
At most one of these can be specified:
--clear-network-tags
Clears all existing Compute Engine tags from the Cloud Run
worker.
--network-tags=[TAG,...]
Applies the given Compute Engine tags (comma separated) to the
Cloud Run worker. To clear existing tags, use
--clear-network-tags.
At most one of these can be specified:
--clear-post-key-revocation-action-type
Remove any previously set post CMEK key revocation action type.
--post-key-revocation-action-type=POST_KEY_REVOCATION_ACTION_TYPE
Action type after CMEK key revocation.
POST_KEY_REVOCATION_ACTION_TYPE must be one of:
prevent-new
No new instances will be started after CMEK key revocation.
shut-down
No new instances will be started and the existing instances will
be shut down after CMEK key revocation.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,
--help, --impersonate-service-account, --log-http, --project, --quiet,
--trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist.

View file

@ -0,0 +1,75 @@
NAME
gcloud alpha run worker-pools describe - obtain details about a given
worker-pool
SYNOPSIS
gcloud alpha run worker-pools describe (WORKER_POOL : --region=REGION)
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Obtain details about a given worker-pool.
EXAMPLES
To obtain details about a given worker-pool:
$ gcloud alpha run worker-pools describe <worker-pool-name>
To get those details in the YAML format:
$ gcloud alpha run worker-pools describe <worker-pool-name> \
--format=yaml
To get them in YAML format suited to export (omitting metadata specific to
this deployment and status info):
$ gcloud alpha run worker-pools describe <worker-pool-name> \
--format=export
POSITIONAL ARGUMENTS
WorkerPool resource - WorkerPool to describe. The arguments in this group
can be used to specify the attributes of this resource. (NOTE) Some
attributes are not given arguments in this group but can be set in other
ways.
To set the project attribute:
◆ provide the argument WORKER_POOL on the command line with a fully
specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
This must be specified.
WORKER_POOL
ID of the WorkerPool or fully qualified identifier for the
WorkerPool.
To set the worker-pool attribute:
▸ provide the argument WORKER_POOL on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Cloud region for the WorkerPool. Overrides the default run/region
property value for this command invocation.
To set the region attribute:
▸ provide the argument WORKER_POOL on the command line with a fully
specified name;
▸ provide the argument --region on the command line;
▸ set the property run/region.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,
--help, --impersonate-service-account, --log-http, --project, --quiet,
--trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist.

View file

@ -0,0 +1,54 @@
NAME
gcloud alpha run worker-pools - view and manage your Cloud Run worker pools
SYNOPSIS
gcloud alpha run worker-pools GROUP | COMMAND [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) This set of commands can be used to view and manage your Cloud Run
worker pools.
EXAMPLES
To list your existing worker-pools, run:
$ gcloud alpha run worker-pools list
GCLOUD WIDE FLAGS
These flags are available to all commands: --help.
Run $ gcloud help for details.
GROUPS
GROUP is one of the following:
revisions
(ALPHA) View and manage your Cloud Run WorkerPools revisions.
COMMANDS
COMMAND is one of the following:
delete
(ALPHA) Delete a worker-pool.
deploy
(ALPHA) Create or update a Cloud Run worker-pool.
describe
(ALPHA) Obtain details about a given worker-pool.
list
(ALPHA) List available worker-pools.
update
(ALPHA) Update Cloud Run environment variables and other configuration
settings.
update-instance-split
(ALPHA) Adjust the instance assignments for a Cloud Run worker-pool.
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist.

View file

@ -0,0 +1,47 @@
NAME
gcloud alpha run worker-pools list - list available worker-pools
SYNOPSIS
gcloud alpha run worker-pools list [--region=REGION] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) List available worker-pools.
EXAMPLES
To list available worker-pools:
$ gcloud alpha run worker-pools list
FLAGS
Region resource - Region to list worker-pools in. This represents a Cloud
resource. (NOTE) Some attributes are not given arguments in this group but
can be set in other ways.
To set the project attribute:
◆ provide the argument --region on the command line with a fully
specified name;
◆ set the property run/region with a fully specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
--region=REGION
ID of the Region or fully qualified identifier for the Region.
To set the region attribute:
▸ provide the argument --region on the command line;
▸ set the property run/region.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,
--help, --impersonate-service-account, --log-http, --project, --quiet,
--trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist.

View file

@ -0,0 +1,79 @@
NAME
gcloud alpha run worker-pools revisions delete - delete a worker pool
revision
SYNOPSIS
gcloud alpha run worker-pools revisions delete
(WORKER_POOL_REVISION : --region=REGION --worker-pool=WORKER_POOL)
[--async] [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Delete a worker pool revision.
EXAMPLES
To delete a revision rev1 of a worker pool worker1 in us-central1:
$ gcloud alpha run worker-pools revisions delete rev1 \
--region=us-central1 --workerpool=worker1
POSITIONAL ARGUMENTS
WorkerPoolRevision resource - Worker pool revision to delete. The
arguments in this group can be used to specify the attributes of this
resource. (NOTE) Some attributes are not given arguments in this group but
can be set in other ways.
To set the project attribute:
◆ provide the argument WORKER_POOL_REVISION on the command line with a
fully specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
This must be specified.
WORKER_POOL_REVISION
ID of the WorkerPoolRevision or fully qualified identifier for the
WorkerPoolRevision.
To set the revision attribute:
▸ provide the argument WORKER_POOL_REVISION on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Cloud region for the WorkerPoolRevision. Overrides the default
run/region property value for this command invocation.
To set the region attribute:
▸ provide the argument WORKER_POOL_REVISION on the command line
with a fully specified name;
▸ provide the argument --region on the command line;
▸ set the property run/region.
--worker-pool=WORKER_POOL
WorkerPool for the WorkerPoolRevision.
To set the worker-pool attribute:
▸ provide the argument WORKER_POOL_REVISION on the command line
with a fully specified name;
▸ provide the argument --worker-pool on the command line.
FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,
--help, --impersonate-service-account, --log-http, --project, --quiet,
--trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist.

View file

@ -0,0 +1,74 @@
NAME
gcloud alpha run worker-pools revisions describe - obtain details about a
given worker pool revision
SYNOPSIS
gcloud alpha run worker-pools revisions describe
(WORKER_POOL_REVISION : --region=REGION --worker-pool=WORKER_POOL)
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Obtain details about a given worker pool revision.
EXAMPLES
To describe a revision rev.1 of a worker pool worker1 in us-central1:
$ gcloud alpha run worker-pools revisions describe rev.1 \
--region=us-central1 --workerpool=worker1
POSITIONAL ARGUMENTS
WorkerPoolRevision resource - Worker pool revision to describe. The
arguments in this group can be used to specify the attributes of this
resource. (NOTE) Some attributes are not given arguments in this group but
can be set in other ways.
To set the project attribute:
◆ provide the argument WORKER_POOL_REVISION on the command line with a
fully specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
This must be specified.
WORKER_POOL_REVISION
ID of the WorkerPoolRevision or fully qualified identifier for the
WorkerPoolRevision.
To set the revision attribute:
▸ provide the argument WORKER_POOL_REVISION on the command line.
This positional argument must be specified if any of the other
arguments in this group are specified.
--region=REGION
The Cloud region for the WorkerPoolRevision. Overrides the default
run/region property value for this command invocation.
To set the region attribute:
▸ provide the argument WORKER_POOL_REVISION on the command line
with a fully specified name;
▸ provide the argument --region on the command line;
▸ set the property run/region.
--worker-pool=WORKER_POOL
WorkerPool for the WorkerPoolRevision.
To set the worker-pool attribute:
▸ provide the argument WORKER_POOL_REVISION on the command line
with a fully specified name;
▸ provide the argument --worker-pool on the command line.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,
--help, --impersonate-service-account, --log-http, --project, --quiet,
--trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist.

View file

@ -0,0 +1,39 @@
NAME
gcloud alpha run worker-pools revisions - view and manage your Cloud Run
WorkerPools revisions
SYNOPSIS
gcloud alpha run worker-pools revisions COMMAND [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) This set of commands can be used to view and manage your existing
Cloud Run WorkerPools revisions.
EXAMPLES
To list your existing worker pools revisions, run:
$ gcloud alpha run worker-pools revisions list
GCLOUD WIDE FLAGS
These flags are available to all commands: --help.
Run $ gcloud help for details.
COMMANDS
COMMAND is one of the following:
delete
(ALPHA) Delete a worker pool revision.
describe
(ALPHA) Obtain details about a given worker pool revision.
list
(ALPHA) List available revisions in a worker pool in a region.
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist.

View file

@ -0,0 +1,65 @@
NAME
gcloud alpha run worker-pools revisions list - list available revisions in
a worker pool in a region
SYNOPSIS
gcloud alpha run worker-pools revisions list
(--worker-pool=WORKER_POOL : --region=REGION) [GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) List available revisions in a worker pool in a region.
EXAMPLES
To list available revisions in a worker pool worker1 in a us-central1:
$ gcloud alpha run worker-pools revisions list worker1 \
--region=us-central1
REQUIRED FLAGS
WorkerPool resource - WorkerPool to list revisions in. The arguments in
this group can be used to specify the attributes of this resource. (NOTE)
Some attributes are not given arguments in this group but can be set in
other ways.
To set the project attribute:
◆ provide the argument --worker-pool on the command line with a fully
specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
This must be specified.
--worker-pool=WORKER_POOL
ID of the WorkerPool or fully qualified identifier for the
WorkerPool.
To set the worker-pool attribute:
▸ provide the argument --worker-pool on the command line.
This flag argument must be specified if any of the other arguments in
this group are specified.
--region=REGION
The Cloud region for the WorkerPool. Overrides the default run/region
property value for this command invocation.
To set the region attribute:
▸ provide the argument --worker-pool on the command line with a
fully specified name;
▸ provide the argument --region on the command line;
▸ set the property run/region.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,
--help, --impersonate-service-account, --log-http, --project, --quiet,
--trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist.

View file

@ -0,0 +1,503 @@
NAME
gcloud alpha run worker-pools update - update Cloud Run environment
variables and other configuration settings
SYNOPSIS
gcloud alpha run worker-pools update [[WORKER_POOL] --region=REGION]
[--async] [--breakglass=JUSTIFICATION] [--container=CONTAINER]
[--description=DESCRIPTION] [--max=MAX] [--max-surge=MAX_SURGE]
[--max-unavailable=MAX_UNAVAILABLE] [--mesh=MESH] [--min=MIN]
[--no-promote] [--remove-containers=[CONTAINER,...]]
[--revision-suffix=REVISION_SUFFIX] [--scaling=SCALING]
[--service-account=SERVICE_ACCOUNT] [--[no-]session-affinity]
[--vpc-egress=VPC_EGRESS]
[--add-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
| --clear-cloudsql-instances
| --remove-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
| --set-cloudsql-instances=[CLOUDSQL-INSTANCES,...]]
[--add-custom-audiences=[CUSTOM-AUDIENCES,...]
| --clear-custom-audiences
| --remove-custom-audiences=[CUSTOM-AUDIENCES,...]
| --set-custom-audiences=[CUSTOM-AUDIENCES,...]]
[--add-volume=[KEY=VALUE,...]
--clear-volumes --remove-volume=[VOLUME,...]]
[--add-volume-mount=[volume=NAME,mount-path=MOUNT_PATH,...]
--args=[ARG,...] --clear-volume-mounts --command=[COMMAND,...]
--cpu=CPU --depends-on=[CONTAINER,...] --image=IMAGE --memory=MEMORY
--remove-volume-mount=[MOUNT_PATH,...] --clear-env-vars
| --env-vars-file=FILE_PATH | --set-env-vars=[KEY=VALUE,...]
| --remove-env-vars=[KEY,...]
--update-env-vars=[KEY=VALUE,...] --clear-secrets
| --set-secrets=[KEY=VALUE,...]
| --remove-secrets=[KEY,...] --update-secrets=[KEY=VALUE,...]]
[--binary-authorization=POLICY | --clear-binary-authorization]
[--clear-encryption-key-shutdown-hours
| --encryption-key-shutdown-hours=ENCRYPTION_KEY_SHUTDOWN_HOURS]
[--clear-key | --key=KEY]
[--clear-labels | --remove-labels=[KEY,...] --labels=[KEY=VALUE,...]
| --update-labels=[KEY=VALUE,...]]
[--clear-network
| --network=NETWORK --subnet=SUBNET --clear-network-tags
| --network-tags=[TAG,...]]
[--clear-post-key-revocation-action-type
| --post-key-revocation-action-type=POST_KEY_REVOCATION_ACTION_TYPE]
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Update Cloud Run environment variables and other configuration
settings.
EXAMPLES
To update one or more env vars:
$ gcloud alpha run worker-pools update myworkerpool \
--update-env-vars=KEY1=VALUE1,KEY2=VALUE2
POSITIONAL ARGUMENTS
WorkerPool resource - WorkerPool to update the configuration of. The
arguments in this group can be used to specify the attributes of this
resource. (NOTE) Some attributes are not given arguments in this group but
can be set in other ways.
To set the project attribute:
◆ provide the argument WORKER_POOL on the command line with a fully
specified name;
◆ specify the workerpool name from an interactive prompt with a fully
specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
[WORKER_POOL]
ID of the WorkerPool or fully qualified identifier for the
WorkerPool.
To set the worker-pool attribute:
▸ provide the argument WORKER_POOL on the command line;
▸ specify the workerpool name from an interactive prompt.
--region=REGION
The Cloud region for the WorkerPool. Overrides the default run/region
property value for this command invocation.
To set the region attribute:
▸ provide the argument WORKER_POOL on the command line with a fully
specified name;
▸ specify the workerpool name from an interactive prompt with a
fully specified name;
▸ provide the argument --region on the command line;
▸ set the property run/region.
FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
--breakglass=JUSTIFICATION
Justification to bypass Binary Authorization policy constraints and
allow the operation. See
https://cloud.google.com/binary-authorization/docs/using-breakglass for
more information. Next update or deploy command will automatically
clear existing breakglass justification.
--container=CONTAINER
Specifies a container by name. Flags following --container will apply
to the specified container.
--description=DESCRIPTION
Provides an optional, human-readable description of the service.
--max=MAX
The maximum number of container instances to run for this WorkerPool or
'default' to use system default of 100. This instance limit will be
divided among all Revisions receiving a percentage of instance
assignments and can be modified without deploying a new Revision.
--max-surge=MAX_SURGE
A maximum percentage of instances that will be moved in each step of
instance split changes. Use "default" to unset the limit and use the
platform default.
--max-unavailable=MAX_UNAVAILABLE
A maximum percentage of instances that may be unavailable during
instance split changes. Use "default" to unset the limit and use the
platform default.
--mesh=MESH
Enables Cloud Service Mesh using the specified mesh resource name. Mesh
resource name must be in the format of
projects/PROJECT/locations/global/meshes/MESH_NAME or MESH_NAME. Will
default to the current project if only MESH_NAME is provided.
--min=MIN
The minimum number of container instances to run for this WorkerPool or
'default' to use system default of 1. These instances will be divided
among all Revisions receiving a percentage of instance assignments and
can be modified without deploying a new Revision.
--no-promote
True to avoid assign instances to the worker revision being deployed.
Setting this flag assigns any instances assigned to the LATEST revision
to the specific revision bound to LATEST before the deployment. The
effect is that the revision being deployed will not receive instance
split.
After a deployment with this flag the LATEST revision will not receive
instances on future deployments. To restore assinging instances to the
LATEST revision by default, run the gcloud run workers
update-instance-split command with --to-latest.
--remove-containers=[CONTAINER,...]
List of containers to remove.
--revision-suffix=REVISION_SUFFIX
Specify the suffix of the revision name. Revision names always start
with the service name automatically. For example, specifying
[--revision-suffix=v1] for a service named 'helloworld', would lead to
a revision named 'helloworld-v1'. Set empty string to clear the suffix
and resume server-assigned naming.
--scaling=SCALING
The scaling mode to use for this resource. Flag value could be either
"auto" for automatic scaling, or a positive integer to configure manual
scaling with the given integer as a fixed instance count.
--service-account=SERVICE_ACCOUNT
the email address of an IAM service account associated with the
revision of the service. The service account represents the identity of
the running revision, and determines what permissions the revision has.
--[no-]session-affinity
Whether to enable session affinity for connections to the service. Use
--session-affinity to enable and --no-session-affinity to disable.
--vpc-egress=VPC_EGRESS
Specify which of the outbound traffic to send through Direct VPC egress
or the VPC connector for this resource. This resource must have Direct
VPC egress enabled or a VPC connector to set this flag. VPC_EGRESS must
be one of:
all
(DEPRECATED) Sends all outbound traffic through Direct VPC egress
or the VPC connector. Provides the same functionality as
'all-traffic'. Prefer to use 'all-traffic' instead.
all-traffic
Sends all outbound traffic through Direct VPC egress or the VPC
connector.
private-ranges-only
Default option. Sends outbound traffic to private IP addresses (RFC
1918 and Private Google Access IPs) through Direct VPC egress or
the VPC connector.
Traffic to other Cloud Run services might require additional
configuration. See
https://cloud.google.com/run/docs/securing/private-networking#send_requests_to_other_services_and_services
for more information.
These flags modify the Cloud SQL instances this WorkerPool connects to.
You can specify a name of a Cloud SQL instance if it's in the same project
and region as your Cloud Run worker pool; otherwise specify
<project>:<region>:<instance> for the instance.
At most one of these can be specified:
--add-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
Append the given values to the current Cloud SQL instances.
--clear-cloudsql-instances
Empty the current Cloud SQL instances.
--remove-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
Remove the given values from the current Cloud SQL instances.
--set-cloudsql-instances=[CLOUDSQL-INSTANCES,...]
Completely replace the current Cloud SQL instances with the given
values.
These flags modify the custom audiences that can be used in the audience
field of ID token for authenticated requests.
At most one of these can be specified:
--add-custom-audiences=[CUSTOM-AUDIENCES,...]
Append the given values to the current custom audiences.
--clear-custom-audiences
Empty the current custom audiences.
--remove-custom-audiences=[CUSTOM-AUDIENCES,...]
Remove the given values from the current custom audiences.
--set-custom-audiences=[CUSTOM-AUDIENCES,...]
Completely replace the current custom audiences with the given
values.
--add-volume=[KEY=VALUE,...]
Adds a volume to the Cloud Run resource. To add more than one volume,
specify this flag multiple times. Volumes must have a name and type
key. Only certain values are supported for type. Depending on the
provided type, other keys will be required. The following types are
supported with the specified additional keys:
cloud-storage: A volume representing a Cloud Storage bucket. This
volume type is mounted using Cloud Storage FUSE. See
https://cloud.google.com/storage/docs/gcs-fuse for the details and
limitations of this filesystem. Additional keys:
◆ readonly: (optional) A boolean. If true, this volume will be
read-only from all mounts.
◆ mount-options: (optional) A list of flags to pass to GCSFuse. Flags
should be specified without leading dashes and separated by
semicolons.
◆ bucket: (optional) the name of the bucket to use as the source of
this volume.
◆ dynamic-mounting: (optional) A boolean. If true, the volume will be
mounted dynamically. Note: You will either need to specify a bucket
or set dynamic-mounting to true, but not both.
in-memory: An ephemeral volume that stores data in the instance's
memory. With this type of volume, data is not shared between instances
and all data will be lost when the instance it is on is terminated.
Additional keys:
◆ size-limit: (optional) A quantity representing the maximum amount
of memory allocated to this volume, such as "512Mi" or "3G". Data
stored in an in-memory volume consumes the memory allocation of the
container that wrote the data. If size-limit is not specified, the
maximum size will be half the total memory limit of all containers.
nfs: Represents a volume backed by an NFS server. Additional keys:
◆ location: (required) The location of the NFS Server, in the form
SERVER:/PATH
◆ readonly: (optional) A boolean. If true, this volume will be
read-only from all mounts.
secret: Represents a secret stored in Secret Manager as a volume.
Additional keys:
◆ secret: (required) The name of the secret in Secret Manager. Must
be a secret in the same project being deployed or be an alias mapped
in the run.googleapis.com/secrets annotation.
◆ version: (required) The version of the secret to make available in
the volume.
◆ path: (required) The relative path within the volume to mount that
version.
--clear-volumes
Remove all existing volumes from the Cloud Run resource, including
volumes mounted as secrets
--remove-volume=[VOLUME,...]
Removes volumes from the Cloud Run resource.
Container Flags
The following flags apply to the container.
--add-volume-mount=[volume=NAME,mount-path=MOUNT_PATH,...]
Adds a mount to the current container. Must contain the keys
volume=NAME and mount-path=/PATH where NAME is the name of a volume
on this resource and PATH is the path within the container's
filesystem to mount this volume.
--args=[ARG,...]
Comma-separated arguments passed to the command run by the
container image. If not specified and no '--command' is provided,
the container image's default Cmd is used. Otherwise, if not
specified, no arguments are passed. To reset this field to its
default, pass an empty string.
--clear-volume-mounts
Remove all existing mounts from the current container.
--command=[COMMAND,...]
Entrypoint for the container image. If not specified, the container
image's default Entrypoint is run. To reset this field to its
default, pass an empty string.
--cpu=CPU
Set a CPU limit in Kubernetes cpu units.
Cloud Run supports values fractional values below 1, 1, 2, 4, and
8. Some CPU values requires a minimum Memory --memory value.
--depends-on=[CONTAINER,...]
List of container dependencies to add to the current container.
--image=IMAGE
Name of the container image to deploy (e.g.
us-docker.pkg.dev/cloudrun/container/hello:latest).
--memory=MEMORY
Set a memory limit. Ex: 1024Mi, 4Gi.
--remove-volume-mount=[MOUNT_PATH,...]
Removes the volume mounted at the specified path from the current
container.
At most one of these can be specified:
--clear-env-vars
Remove all environment variables.
--env-vars-file=FILE_PATH
Path to a local YAML file with definitions for all environment
variables. All existing environment variables will be removed
before the new environment variables are added. Example YAML
content:
KEY_1: "value1"
KEY_2: "value 2"
--set-env-vars=[KEY=VALUE,...]
List of key-value pairs to set as environment variables. All
existing environment variables will be removed first.
Only --update-env-vars and --remove-env-vars can be used together.
If both are specified, --remove-env-vars will be applied first.
--remove-env-vars=[KEY,...]
List of environment variables to be removed.
--update-env-vars=[KEY=VALUE,...]
List of key-value pairs to set as environment variables.
Specify secrets to provide as environment variables. For example:
'--set-secrets=ENV=mysecret:latest,OTHER_ENV=othersecret:1' will
create an environment variable named ENV whose value is the latest
version of secret 'mysecret' and an environment variable OTHER_ENV
whose value is version of 1 of secret 'othersecret'.
At most one of these can be specified:
--clear-secrets
Remove all secrets.
--set-secrets=[KEY=VALUE,...]
List of key-value pairs to set as secrets. All existing secrets
will be removed first.
Only --update-secrets and --remove-secrets can be used together. If
both are specified, --remove-secrets will be applied first.
--remove-secrets=[KEY,...]
List of secrets to be removed.
--update-secrets=[KEY=VALUE,...]
List of key-value pairs to set as secrets.
At most one of these can be specified:
--binary-authorization=POLICY
Binary Authorization policy to check against. This must be set to
"default".
--clear-binary-authorization
Remove any previously set Binary Authorization policy.
At most one of these can be specified:
--clear-encryption-key-shutdown-hours
Remove any previously set CMEK key shutdown hours setting.
--encryption-key-shutdown-hours=ENCRYPTION_KEY_SHUTDOWN_HOURS
The number of hours to wait before an automatic shutdown server after
CMEK key revocation is detected.
At most one of these can be specified:
--clear-key
Remove any previously set CMEK key reference.
--key=KEY
CMEK key reference to encrypt the container with.
At most one of these can be specified:
--clear-labels
Remove all labels. If --update-labels is also specified then
--clear-labels is applied first.
For example, to remove all labels:
$ gcloud alpha run worker-pools update --clear-labels
To remove all existing labels and create two new labels, foo and baz:
$ gcloud alpha run worker-pools update --clear-labels \
--update-labels foo=bar,baz=qux
--remove-labels=[KEY,...]
List of label keys to remove. If a label does not exist it is
silently ignored. If --update-labels is also specified then
--update-labels is applied first.
At most one of these can be specified:
--labels=[KEY=VALUE,...]
List of label KEY=VALUE pairs to add.
An alias to --update-labels.
--update-labels=[KEY=VALUE,...]
List of label KEY=VALUE pairs to update. If a label exists, its value
is modified. Otherwise, a new label is created.
At most one of these can be specified:
--clear-network
Disconnect this Cloud Run worker from the VPC network it is connected
to.
Direct VPC egress setting flags group.
--network=NETWORK
The VPC network that the Cloud Run worker will be able to send
traffic to. If --subnet is also specified, subnet must be a
subnetwork of the network specified by this --network flag. To
clear existing VPC network settings, use --clear-network.
--subnet=SUBNET
The VPC subnetwork that the Cloud Run worker will get IPs from. The
subnetwork must be /26 or larger. If --network is also specified,
subnet must be a subnetwork of the network specified by the
--network flag. If --network is not specified, network will be
looked up from this subnetwork. To clear existing VPC network
settings, use --clear-network.
At most one of these can be specified:
--clear-network-tags
Clears all existing Compute Engine tags from the Cloud Run
worker.
--network-tags=[TAG,...]
Applies the given Compute Engine tags (comma separated) to the
Cloud Run worker. To clear existing tags, use
--clear-network-tags.
At most one of these can be specified:
--clear-post-key-revocation-action-type
Remove any previously set post CMEK key revocation action type.
--post-key-revocation-action-type=POST_KEY_REVOCATION_ACTION_TYPE
Action type after CMEK key revocation.
POST_KEY_REVOCATION_ACTION_TYPE must be one of:
prevent-new
No new instances will be started after CMEK key revocation.
shut-down
No new instances will be started and the existing instances will
be shut down after CMEK key revocation.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,
--help, --impersonate-service-account, --log-http, --project, --quiet,
--trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist.

View file

@ -0,0 +1,133 @@
NAME
gcloud alpha run worker-pools update-instance-split - adjust the instance
assignments for a Cloud Run worker-pool
SYNOPSIS
gcloud alpha run worker-pools update-instance-split
[[WORKER_POOL] --region=REGION] [--async] [--breakglass=JUSTIFICATION]
[--to-latest | --to-revisions=[REVISION-NAME=PERCENTAGE,...]]
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Adjust the instance assignments for a Cloud Run worker-pool.
EXAMPLES
To assign 10% of instances to revision my-worker-pool-s5sxn and 90% of
instances to revision my-worker-pool-cp9kw run:
$ gcloud alpha run worker-pools update-instance-split \
my-worker-pool \
--to-revisions=my-worker-pool-s5sxn=10,my-worker-pool-cp9kw=90
To increase the instances to revision my-worker-pool-s5sxn to 20% and by
reducing the instances to revision my-worker-pool-cp9kw to 80% run:
$ gcloud alpha run worker-pools update-instance-split \
my-worker-pool --to-revisions=my-worker-pool-s5sxn=20
To rollback to revision my-worker-pool-cp9kw run:
$ gcloud alpha run worker-pools update-instance-split \
my-worker-pool --to-revisions=my-worker-pool-cp9kw=100
To assign 100% of instances to the current or future LATEST revision run:
$ gcloud alpha run worker-pools update-instance-split \
my-worker-pool --to-latest
You can also refer to the current or future LATEST revision in
--to-revisions by the string "LATEST". For example, to set 10% of instances
to always float to the latest revision:
$ gcloud alpha run worker-pools update-instance-split \
my-worker-pool --to-revisions=LATEST=10
POSITIONAL ARGUMENTS
WorkerPool resource - WorkerPool to update instance split of. The
arguments in this group can be used to specify the attributes of this
resource. (NOTE) Some attributes are not given arguments in this group but
can be set in other ways.
To set the project attribute:
◆ provide the argument WORKER_POOL on the command line with a fully
specified name;
◆ specify the workerpool name from an interactive prompt with a fully
specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
[WORKER_POOL]
ID of the WorkerPool or fully qualified identifier for the
WorkerPool.
To set the worker-pool attribute:
▸ provide the argument WORKER_POOL on the command line;
▸ specify the workerpool name from an interactive prompt.
--region=REGION
The Cloud region for the WorkerPool. Overrides the default run/region
property value for this command invocation.
To set the region attribute:
▸ provide the argument WORKER_POOL on the command line with a fully
specified name;
▸ specify the workerpool name from an interactive prompt with a
fully specified name;
▸ provide the argument --region on the command line;
▸ set the property run/region.
FLAGS
--async
Return immediately, without waiting for the operation in progress to
complete.
--breakglass=JUSTIFICATION
Justification to bypass Binary Authorization policy constraints and
allow the operation. See
https://cloud.google.com/binary-authorization/docs/using-breakglass for
more information. Next update or deploy command will automatically
clear existing breakglass justification.
At most one of these can be specified:
--to-latest
True to assign 100 percent of instances to the 'latest' revision of
this service. Note that when a new revision is created, it will
become the 'latest' and instances will be fully assigned to it unless
configured otherwise using --[no-]promote flag. Defaults to False.
Synonymous with '--to-revisions=LATEST=100'.
--to-revisions=[REVISION-NAME=PERCENTAGE,...]
Comma separated list of instance assignments in the form
REVISION-NAME=PERCENTAGE. REVISION-NAME must be the name for a
revision for the worker as returned by 'gcloud run workers revisions
list --worker=WORKER' . PERCENTAGE must be an integer percentage
between 0 and 100 inclusive. Ex worker-nw9hs=10,worker-nw9hs=20 Up to
100 percent of instances may be assigned. If the total of 100 percent
of instances is assigned, the Worker instance split is updated as
specified. If under 100 percent of instance split is assigned, the
Worker instance split is updated as specified for revisions with
assignments and instance split is scaled up or down proportionally as
needed for revision that are currently serving workload but that do
not have new assignments. For example assume revision-1 is serving 40
percent of workload and revision-2 is serving 60 percent. If
revision-1 is assigned 45 percent of instances and no assignment is
made for revision-2, the worker is updated with revsion-1 assigned 45
percent of instances and revision-2 scaled down to 55 percent. You
can use "LATEST" as a special revision name to always put the given
percentage of instance split on the latest ready revision.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account,
--billing-project, --configuration, --flags-file, --flatten, --format,
--help, --impersonate-service-account, --log-http, --project, --quiet,
--trace-token, --user-output-enabled, --verbosity.
Run $ gcloud help for details.
NOTES
This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct
project, you might be trying to access an API with an invitation-only early
access allowlist.