Skip to content

Commit d534d01

Browse files
Google APIscopybara-github
authored andcommitted
feat: add SourceCode proto to Run container config
docs: A comment for field `etag` in message `.google.cloud.run.v2.Job` is changed docs: A comment for field `limits` in message `.google.cloud.run.v2.ResourceRequirements` is changed docs: A comment for field `items` in message `.google.cloud.run.v2.SecretVolumeSource` is changed docs: A comment for field `name` in message `.google.cloud.run.v2.Service` is changed docs: A comment for field `invoker_iam_disabled` in message `.google.cloud.run.v2.Service` is changed docs: A comment for field `etag` in message `.google.cloud.run.v2.Service` is changed docs: A comment for field `observed_generation` in message `.google.cloud.run.v2.WorkerPool` is changed docs: A comment for field `latest_ready_revision` in message `.google.cloud.run.v2.WorkerPool` is changed docs: A comment for field `custom_audiences` in message `.google.cloud.run.v2.WorkerPool` is changed docs: A comment for field `reconciling` in message `.google.cloud.run.v2.WorkerPool` is changed docs: A comment for field `etag` in message `.google.cloud.run.v2.WorkerPool` is changed PiperOrigin-RevId: 840919560
1 parent 534adc5 commit d534d01

8 files changed

Lines changed: 113 additions & 34 deletions

File tree

google/cloud/run/v2/build.proto

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package google.cloud.run.v2;
1919
import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
22+
import "google/api/launch_stage.proto";
2223
import "google/api/resource.proto";
2324
import "google/longrunning/operations.proto";
2425

@@ -128,6 +129,18 @@ message SubmitBuildRequest {
128129

129130
// Optional. Additional tags to annotate the build.
130131
repeated string tags = 8 [(google.api.field_behavior) = OPTIONAL];
132+
133+
// Optional. The machine type from default pool to use for the build. If left
134+
// blank, cloudbuild will use a sensible default. Currently only E2_HIGHCPU_8
135+
// is supported. If worker_pool is set, this field will be ignored.
136+
string machine_type = 9 [(google.api.field_behavior) = OPTIONAL];
137+
138+
// Optional. The release track of the client that initiated the build request.
139+
google.api.LaunchStage release_track = 10
140+
[(google.api.field_behavior) = OPTIONAL];
141+
142+
// Optional. The client that initiated the build request.
143+
string client = 11 [(google.api.field_behavior) = OPTIONAL];
131144
}
132145

133146
// Response message for submitting a Build.

google/cloud/run/v2/condition.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ message Condition {
179179

180180
// The execution was deleted.
181181
DELETED = 5;
182+
183+
// A delayed execution is waiting for a start time.
184+
DELAYED_START_PENDING = 6;
182185
}
183186

184187
// type is used to communicate the status of the reconciliation process.

google/cloud/run/v2/job.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,9 @@ message Job {
491491
string run_execution_token = 27;
492492
}
493493

494-
// Output only. A system-generated fingerprint for this version of the
494+
// Optional. A system-generated fingerprint for this version of the
495495
// resource. May be used to detect modification conflict during updates.
496-
string etag = 99 [(google.api.field_behavior) = OUTPUT_ONLY];
496+
string etag = 99 [(google.api.field_behavior) = OPTIONAL];
497497
}
498498

499499
// Reference to an Execution. Use /Executions.GetExecution with the given name

google/cloud/run/v2/k8s.min.proto

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ message Container {
5454
// Dockerhub is assumed.
5555
string image = 2 [(google.api.field_behavior) = REQUIRED];
5656

57+
// Optional. Location of the source.
58+
SourceCode source_code = 17 [(google.api.field_behavior) = OPTIONAL];
59+
5760
// Entrypoint array. Not executed within a shell.
5861
// The docker image's ENTRYPOINT is used if this is not provided.
5962
repeated string command = 3;
@@ -107,14 +110,15 @@ message Container {
107110

108111
// ResourceRequirements describes the compute resource requirements.
109112
message ResourceRequirements {
110-
// Only `memory` and `cpu` keys in the map are supported.
113+
// Only `memory`, `cpu` and `nvidia.com/gpu` keys in the map are supported.
111114
//
112115
// <p>Notes:
113116
// * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4
114117
// CPU requires at least 2Gi of memory. For more information, go to
115118
// https://cloud.google.com/run/docs/configuring/cpu.
116119
// * For supported 'memory' values and syntax, go to
117120
// https://cloud.google.com/run/docs/configuring/memory-limits
121+
// * The only supported 'nvidia.com/gpu' value is '1'.
118122
map<string, string> limits = 1;
119123

120124
// Determines whether CPU is only allocated during requests (true by default).
@@ -194,6 +198,10 @@ message VolumeMount {
194198
// available as `/cloudsql/[instance]`. For more information on Cloud SQL
195199
// volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run
196200
string mount_path = 3 [(google.api.field_behavior) = REQUIRED];
201+
202+
// Optional. Path within the volume from which the container's volume should
203+
// be mounted. Defaults to "" (volume's root).
204+
string sub_path = 4 [(google.api.field_behavior) = OPTIONAL];
197205
}
198206

199207
// Volume represents a named volume in a container.
@@ -232,7 +240,7 @@ message SecretVolumeSource {
232240
string secret = 1 [(google.api.field_behavior) = REQUIRED];
233241

234242
// If unspecified, the volume will expose a file whose name is the
235-
// secret, relative to VolumeMount.mount_path.
243+
// secret, relative to VolumeMount.mount_path + VolumeMount.sub_path.
236244
// If specified, the key will be used as the version to fetch from Cloud
237245
// Secret Manager and the path will be the name of the file exposed in the
238246
// volume. When items are defined, they must specify a path and a version.
@@ -449,3 +457,24 @@ message BuildInfo {
449457
// Output only. Source code location of the image.
450458
string source_location = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
451459
}
460+
461+
// Source type for the container.
462+
message SourceCode {
463+
// Cloud Storage source.
464+
message CloudStorageSource {
465+
// Required. The Cloud Storage bucket name.
466+
string bucket = 1 [(google.api.field_behavior) = REQUIRED];
467+
468+
// Required. The Cloud Storage object name.
469+
string object = 2 [(google.api.field_behavior) = REQUIRED];
470+
471+
// Optional. The Cloud Storage object generation.
472+
int64 generation = 3 [(google.api.field_behavior) = OPTIONAL];
473+
}
474+
475+
// The source type.
476+
oneof source_type {
477+
// The source is a Cloud Storage bucket.
478+
CloudStorageSource cloud_storage_source = 1;
479+
}
480+
}

google/cloud/run/v2/service.proto

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,10 @@ message ListServicesResponse {
240240
// A token indicating there are more items than page_size. Use it in the next
241241
// ListServices request to continue.
242242
string next_page_token = 2;
243+
244+
// Output only. For global requests, returns the list of regions that could
245+
// not be reached within the deadline.
246+
repeated string unreachable = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
243247
}
244248

245249
// Request message for obtaining a Service by its full name.
@@ -284,13 +288,22 @@ message Service {
284288
style: DECLARATIVE_FRIENDLY
285289
};
286290

287-
// The fully qualified name of this Service. In CreateServiceRequest, this
288-
// field is ignored, and instead composed from CreateServiceRequest.parent and
289-
// CreateServiceRequest.service_id.
291+
// Settings for multi-region deployment.
292+
message MultiRegionSettings {
293+
// Required. List of regions to deploy to, including primary region.
294+
repeated string regions = 1 [(google.api.field_behavior) = REQUIRED];
295+
296+
// Optional. System-generated unique id for the multi-region Service.
297+
string multi_region_id = 2 [(google.api.field_behavior) = OPTIONAL];
298+
}
299+
300+
// Identifier. The fully qualified name of this Service. In
301+
// CreateServiceRequest, this field is ignored, and instead composed from
302+
// CreateServiceRequest.parent and CreateServiceRequest.service_id.
290303
//
291304
// Format:
292305
// projects/{project}/locations/{location}/services/{service_id}
293-
string name = 1;
306+
string name = 1 [(google.api.field_behavior) = IDENTIFIER];
294307

295308
// User-provided description of the Service. This field currently has a
296309
// 512-character limit.
@@ -397,8 +410,7 @@ message Service {
397410
ServiceScaling scaling = 20 [(google.api.field_behavior) = OPTIONAL];
398411

399412
// Optional. Disables IAM permission check for run.routes.invoke for callers
400-
// of this service. This feature is available by invitation only. For more
401-
// information, visit
413+
// of this service. For more information, visit
402414
// https://cloud.google.com/run/docs/securing/managing-access#invoker_check.
403415
bool invoker_iam_disabled = 21 [(google.api.field_behavior) = OPTIONAL];
404416

@@ -408,6 +420,13 @@ message Service {
408420
// Output only. All URLs serving traffic for this Service.
409421
repeated string urls = 24 [(google.api.field_behavior) = OUTPUT_ONLY];
410422

423+
// Optional. IAP settings on the Service.
424+
bool iap_enabled = 25 [(google.api.field_behavior) = OPTIONAL];
425+
426+
// Optional. Settings for multi-region deployment.
427+
MultiRegionSettings multi_region_settings = 26
428+
[(google.api.field_behavior) = OPTIONAL];
429+
411430
// One or more custom audiences that you want this service to support. Specify
412431
// each custom audience as the full URL in a string. The custom audiences are
413432
// encoded in the token and used to authenticate requests. For more
@@ -463,6 +482,11 @@ message Service {
463482
// Output only. Reserved for future use.
464483
bool satisfies_pzs = 38 [(google.api.field_behavior) = OUTPUT_ONLY];
465484

485+
// Output only. True if Cloud Run Threat Detection monitoring is enabled for
486+
// the parent project of this Service.
487+
bool threat_detection_enabled = 40
488+
[(google.api.field_behavior) = OUTPUT_ONLY];
489+
466490
// Optional. Configuration for building a Cloud Run function.
467491
BuildConfig build_config = 41 [(google.api.field_behavior) = OPTIONAL];
468492

@@ -490,7 +514,7 @@ message Service {
490514
// can be found in `terminal_condition` and `conditions`.
491515
bool reconciling = 98 [(google.api.field_behavior) = OUTPUT_ONLY];
492516

493-
// Output only. A system-generated fingerprint for this version of the
517+
// Optional. A system-generated fingerprint for this version of the
494518
// resource. May be used to detect modification conflict during updates.
495-
string etag = 99 [(google.api.field_behavior) = OUTPUT_ONLY];
519+
string etag = 99 [(google.api.field_behavior) = OPTIONAL];
496520
}

google/cloud/run/v2/vendor_settings.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ message ServiceScaling {
163163
// Optional. The scaling mode for the service.
164164
ScalingMode scaling_mode = 3 [(google.api.field_behavior) = OPTIONAL];
165165

166+
// Optional. total max instances for the service. This number of instances is
167+
// divided among all revisions with specified traffic based on the percent
168+
// of traffic they are receiving.
169+
int32 max_instance_count = 4 [(google.api.field_behavior) = OPTIONAL];
170+
166171
// Optional. total instance count for the service in manual scaling mode. This
167172
// number of instances is divided among all revisions with specified traffic
168173
// based on the percent of traffic they are receiving.

google/cloud/run/v2/worker_pool.proto

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ message WorkerPool {
409409
// Optional. Specifies worker-pool-level scaling settings
410410
WorkerPoolScaling scaling = 20 [(google.api.field_behavior) = OPTIONAL];
411411

412-
// Output only. The generation of this WorkerPool currently serving traffic.
412+
// Output only. The generation of this WorkerPool currently serving workloads.
413413
// See comments in `reconciling` for additional information on reconciliation
414414
// process in Cloud Run. Please note that unlike v1, this is an int64 value.
415415
// As with most Google APIs, its JSON representation will be a `string`
@@ -429,7 +429,7 @@ message WorkerPool {
429429
repeated Condition conditions = 32
430430
[(google.api.field_behavior) = OUTPUT_ONLY];
431431

432-
// Output only. Name of the latest revision that is serving traffic. See
432+
// Output only. Name of the latest revision that is serving workloads. See
433433
// comments in `reconciling` for additional information on reconciliation
434434
// process in Cloud Run.
435435
string latest_ready_revision = 33 [
@@ -451,11 +451,12 @@ message WorkerPool {
451451
repeated InstanceSplitStatus instance_split_statuses = 27
452452
[(google.api.field_behavior) = OUTPUT_ONLY];
453453

454-
// One or more custom audiences that you want this worker pool to support.
455-
// Specify each custom audience as the full URL in a string. The custom
456-
// audiences are encoded in the token and used to authenticate requests. For
457-
// more information, see
458-
// https://cloud.google.com/run/docs/configuring/custom-audiences.
454+
// Output only. Indicates whether Cloud Run Threat Detection monitoring is
455+
// enabled for the parent project of this worker pool.
456+
bool threat_detection_enabled = 28
457+
[(google.api.field_behavior) = OUTPUT_ONLY];
458+
459+
// Not supported, and ignored by Cloud Run.
459460
repeated string custom_audiences = 37;
460461

461462
// Output only. Reserved for future use.
@@ -468,24 +469,24 @@ message WorkerPool {
468469
// will asynchronously perform all necessary steps to bring the WorkerPool to
469470
// the desired serving state. This process is called reconciliation. While
470471
// reconciliation is in process, `observed_generation`,
471-
// `latest_ready_revison`, `traffic_statuses`, and `uri` will have transient
472-
// values that might mismatch the intended state: Once reconciliation is over
473-
// (and this field is false), there are two possible outcomes: reconciliation
474-
// succeeded and the serving state matches the WorkerPool, or there was an
475-
// error, and reconciliation failed. This state can be found in
476-
// `terminal_condition.state`.
472+
// `latest_ready_revison`, `instance_split_statuses`, and `uri` will have
473+
// transient values that might mismatch the intended state: Once
474+
// reconciliation is over (and this field is false), there are two possible
475+
// outcomes: reconciliation succeeded and the serving state matches the
476+
// WorkerPool, or there was an error, and reconciliation failed. This state
477+
// can be found in `terminal_condition.state`.
477478
//
478-
// If reconciliation succeeded, the following fields will match: `traffic` and
479-
// `traffic_statuses`, `observed_generation` and `generation`,
480-
// `latest_ready_revision` and `latest_created_revision`.
479+
// If reconciliation succeeded, the following fields will match:
480+
// `instance_splits` and `instance_split_statuses`, `observed_generation` and
481+
// `generation`, `latest_ready_revision` and `latest_created_revision`.
481482
//
482-
// If reconciliation failed, `traffic_statuses`, `observed_generation`, and
483-
// `latest_ready_revision` will have the state of the last serving revision,
484-
// or empty for newly created WorkerPools. Additional information on the
485-
// failure can be found in `terminal_condition` and `conditions`.
483+
// If reconciliation failed, `instance_split_statuses`, `observed_generation`,
484+
// and `latest_ready_revision` will have the state of the last serving
485+
// revision, or empty for newly created WorkerPools. Additional information on
486+
// the failure can be found in `terminal_condition` and `conditions`.
486487
bool reconciling = 98 [(google.api.field_behavior) = OUTPUT_ONLY];
487488

488-
// Output only. A system-generated fingerprint for this version of the
489+
// Optional. A system-generated fingerprint for this version of the
489490
// resource. May be used to detect modification conflict during updates.
490-
string etag = 99 [(google.api.field_behavior) = OUTPUT_ONLY];
491+
string etag = 99 [(google.api.field_behavior) = OPTIONAL];
491492
}

google/cloud/run/v2/worker_pool_revision_template.proto

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,8 @@ message WorkerPoolRevisionTemplate {
102102

103103
// Optional. The node selector for the revision template.
104104
NodeSelector node_selector = 13 [(google.api.field_behavior) = OPTIONAL];
105+
106+
// Optional. True if GPU zonal redundancy is disabled on this worker pool.
107+
optional bool gpu_zonal_redundancy_disabled = 16
108+
[(google.api.field_behavior) = OPTIONAL];
105109
}

0 commit comments

Comments
 (0)