xref: /aosp_15_r20/external/googleapis/google/cloud/run/v2/revision_template.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.run.v2;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/cloud/run/v2/k8s.min.proto";
22import "google/cloud/run/v2/vendor_settings.proto";
23import "google/protobuf/duration.proto";
24
25option go_package = "cloud.google.com/go/run/apiv2/runpb;runpb";
26option java_multiple_files = true;
27option java_outer_classname = "RevisionTemplateProto";
28option java_package = "com.google.cloud.run.v2";
29
30// RevisionTemplate describes the data a revision should have when created from
31// a template.
32message RevisionTemplate {
33  // The unique name for the revision. If this field is omitted, it will be
34  // automatically generated based on the Service name.
35  string revision = 1 [
36    (google.api.resource_reference) = { type: "run.googleapis.com/Revision" }
37  ];
38
39  // Unstructured key value map that can be used to organize and categorize
40  // objects.
41  // User-provided labels are shared with Google's billing system, so they can
42  // be used to filter, or break down billing charges by team, component,
43  // environment, state, etc. For more information, visit
44  // https://cloud.google.com/resource-manager/docs/creating-managing-labels or
45  // https://cloud.google.com/run/docs/configuring/labels.
46  //
47  // <p>Cloud Run API v2 does not support labels with `run.googleapis.com`,
48  // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
49  // namespaces, and they will be rejected. All system labels in v1 now have a
50  // corresponding field in v2 RevisionTemplate.
51  map<string, string> labels = 2;
52
53  // Unstructured key value map that may be set by external tools to store and
54  // arbitrary metadata. They are not queryable and should be preserved
55  // when modifying objects.
56  //
57  // <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`,
58  // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev`
59  // namespaces, and they will be rejected. All system annotations in v1 now
60  // have a corresponding field in v2 RevisionTemplate.
61  //
62  // <p>This field follows Kubernetes annotations' namespacing, limits, and
63  // rules.
64  map<string, string> annotations = 3;
65
66  // Scaling settings for this Revision.
67  RevisionScaling scaling = 4;
68
69  // VPC Access configuration to use for this Revision. For more information,
70  // visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
71  VpcAccess vpc_access = 6;
72
73  // Max allowed time for an instance to respond to a request.
74  google.protobuf.Duration timeout = 8;
75
76  // Email address of the IAM service account associated with the revision of
77  // the service. The service account represents the identity of the running
78  // revision, and determines what permissions the revision has. If not
79  // provided, the revision will use the project's default service account.
80  string service_account = 9;
81
82  // Holds the single container that defines the unit of execution for this
83  // Revision.
84  repeated Container containers = 10;
85
86  // A list of Volumes to make available to containers.
87  repeated Volume volumes = 11;
88
89  // The sandbox environment to host this Revision.
90  ExecutionEnvironment execution_environment = 13;
91
92  // A reference to a customer managed encryption key (CMEK) to use to encrypt
93  // this container image. For more information, go to
94  // https://cloud.google.com/run/docs/securing/using-cmek
95  string encryption_key = 14 [(google.api.resource_reference) = {
96    type: "cloudkms.googleapis.com/CryptoKey"
97  }];
98
99  // Sets the maximum number of requests that each serving instance can receive.
100  int32 max_instance_request_concurrency = 15;
101
102  // Optional. Enable session affinity.
103  bool session_affinity = 19 [(google.api.field_behavior) = OPTIONAL];
104
105  // Optional. Disables health checking containers during deployment.
106  bool health_check_disabled = 20 [(google.api.field_behavior) = OPTIONAL];
107}
108