execution_template.proto 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.cloud.run.v2;
  16. import "google/api/field_behavior.proto";
  17. import "google/cloud/run/v2/task_template.proto";
  18. option go_package = "google.golang.org/genproto/googleapis/cloud/run/v2;run";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "ExecutionTemplateProto";
  21. option java_package = "com.google.cloud.run.v2";
  22. // ExecutionTemplate describes the data an execution should have when created
  23. // from a template.
  24. message ExecutionTemplate {
  25. // KRM-style labels for the resource.
  26. map<string, string> labels = 1;
  27. // KRM-style annotations for the resource.
  28. map<string, string> annotations = 2;
  29. // Specifies the maximum desired number of tasks the execution should run at
  30. // given time. Must be <= task_count.
  31. // When the job is run, if this field is 0 or unset, the maximum possible
  32. // value will be used for that execution.
  33. // The actual number of tasks running in steady state will be less than this
  34. // number when there are fewer tasks waiting to be completed remaining,
  35. // i.e. when the work left to do is less than max parallelism.
  36. int32 parallelism = 3;
  37. // Specifies the desired number of tasks the execution should run.
  38. // Setting to 1 means that parallelism is limited to 1 and the success of
  39. // that task signals the success of the execution.
  40. // More info:
  41. // https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
  42. int32 task_count = 4;
  43. // Required. Describes the task(s) that will be created when executing an execution.
  44. TaskTemplate template = 5 [(google.api.field_behavior) = REQUIRED];
  45. }