task_template.proto 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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/resource.proto";
  17. import "google/cloud/run/v2/k8s.min.proto";
  18. import "google/cloud/run/v2/vendor_settings.proto";
  19. import "google/protobuf/duration.proto";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/run/v2;run";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "TaskTemplateProto";
  23. option java_package = "com.google.cloud.run.v2";
  24. // TaskTemplate describes the data a task should have when created
  25. // from a template.
  26. message TaskTemplate {
  27. // Holds the single container that defines the unit of execution for this
  28. // task.
  29. repeated Container containers = 1;
  30. // A list of Volumes to make available to containers.
  31. repeated Volume volumes = 2;
  32. oneof retries {
  33. // Number of retries allowed per Task, before marking this Task failed.
  34. int32 max_retries = 3;
  35. }
  36. // Max allowed time duration the Task may be active before the system will
  37. // actively try to mark it failed and kill associated containers. This applies
  38. // per attempt of a task, meaning each retry can run for the full timeout.
  39. google.protobuf.Duration timeout = 4;
  40. // Email address of the IAM service account associated with the Task of a
  41. // Job. The service account represents the identity of the
  42. // running task, and determines what permissions the task has. If
  43. // not provided, the task will use the project's default service account.
  44. string service_account = 5;
  45. // The execution environment being used to host this Task.
  46. ExecutionEnvironment execution_environment = 6;
  47. // A reference to a customer managed encryption key (CMEK) to use to encrypt
  48. // this container image. For more information, go to
  49. // https://cloud.google.com/run/docs/securing/using-cmek
  50. string encryption_key = 7 [(google.api.resource_reference) = {
  51. type: "cloudkms.googleapis.com/CryptoKey"
  52. }];
  53. // VPC Access configuration to use for this Task. For more information,
  54. // visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
  55. VpcAccess vpc_access = 8;
  56. }