1
0
Fork 0
mirror of https://github.com/imjasonh/gcloud-help synced 2026-07-09 02:55:19 +00:00
gcloud-help/gcloud/alpha/run/workers/update-instance-split

123 lines
5.3 KiB
Text
Raw Normal View History

2024-05-30 09:26:18 +00:00
NAME
gcloud alpha run workers update-instance-split - adjust the instance
assignments for a Cloud Run worker
SYNOPSIS
gcloud alpha run workers update-instance-split [WORKER] [--async]
[--breakglass=JUSTIFICATION] [--region=REGION]
[--to-latest | --to-revisions=[REVISION-NAME=PERCENTAGE,...]]
[GCLOUD_WIDE_FLAG ...]
DESCRIPTION
(ALPHA) Adjust the instance assignments for a Cloud Run worker.
EXAMPLES
To assign 10% of instances to revision my-worker-s5sxn and 90% of instances
to revision my-worker-cp9kw run:
$ gcloud alpha run workers update-instance-split my-worker \
--to-revisions=my-worker-s5sxn=10,my-worker-cp9kw=90
To increase the instances to revision my-worker-s5sxn to 20% and by
reducing the instances to revision my-worker-cp9kw to 80% run:
$ gcloud alpha run workers update-instance-split my-worker \
--to-revisions=my-worker-s5sxn=20
To rollback to revision my-worker-cp9kw run:
$ gcloud alpha run workers update-instance-split my-worker \
--to-revisions=my-worker-cp9kw=100
To assign 100% of instances to the current or future LATEST revision run:
$ gcloud alpha run workers update-instance-split my-worker \
--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 workers update-instance-split my-worker \
--to-revisions=LATEST=10
POSITIONAL ARGUMENTS
Worker resource - Worker to update instance split of. 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 WORKER on the command line with a fully
specified name;
◆ specify the worker name from an interactive prompt with a fully
specified name;
◆ provide the argument --project on the command line;
◆ set the property core/project.
[WORKER]
ID of the worker or fully qualified identifier for the worker.
To set the worker attribute:
▸ provide the argument WORKER on the command line;
▸ specify the worker name from an interactive prompt.
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.
--region=REGION
Region in which the resource can be found. Alternatively, set the
property [run/region].
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.