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/cloud/run/v2/task_template.proto"; 21 22option go_package = "cloud.google.com/go/run/apiv2/runpb;runpb"; 23option java_multiple_files = true; 24option java_outer_classname = "ExecutionTemplateProto"; 25option java_package = "com.google.cloud.run.v2"; 26 27// ExecutionTemplate describes the data an execution should have when created 28// from a template. 29message ExecutionTemplate { 30 // Unstructured key value map that can be used to organize and categorize 31 // objects. 32 // User-provided labels are shared with Google's billing system, so they can 33 // be used to filter, or break down billing charges by team, component, 34 // environment, state, etc. For more information, visit 35 // https://cloud.google.com/resource-manager/docs/creating-managing-labels or 36 // https://cloud.google.com/run/docs/configuring/labels. 37 // 38 // <p>Cloud Run API v2 does not support labels with `run.googleapis.com`, 39 // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` 40 // namespaces, and they will be rejected. All system labels in v1 now have a 41 // corresponding field in v2 ExecutionTemplate. 42 map<string, string> labels = 1; 43 44 // Unstructured key value map that may be set by external tools to store and 45 // arbitrary metadata. They are not queryable and should be preserved 46 // when modifying objects. 47 // 48 // <p>Cloud Run API v2 does not support annotations with `run.googleapis.com`, 49 // `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` 50 // namespaces, and they will be rejected. All system annotations in v1 now 51 // have a corresponding field in v2 ExecutionTemplate. 52 // 53 // <p>This field follows Kubernetes annotations' namespacing, limits, and 54 // rules. 55 map<string, string> annotations = 2; 56 57 // Specifies the maximum desired number of tasks the execution should run at 58 // given time. Must be <= task_count. 59 // When the job is run, if this field is 0 or unset, the maximum possible 60 // value will be used for that execution. 61 // The actual number of tasks running in steady state will be less than this 62 // number when there are fewer tasks waiting to be completed remaining, 63 // i.e. when the work left to do is less than max parallelism. 64 int32 parallelism = 3; 65 66 // Specifies the desired number of tasks the execution should run. 67 // Setting to 1 means that parallelism is limited to 1 and the success of 68 // that task signals the success of the execution. Defaults to 1. 69 int32 task_count = 4; 70 71 // Required. Describes the task(s) that will be created when executing an 72 // execution. 73 TaskTemplate template = 5 [(google.api.field_behavior) = REQUIRED]; 74} 75