generated.proto 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /*
  2. Copyright The Kubernetes Authors.
  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. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. */
  13. // This file was autogenerated by go-to-protobuf. Do not edit it manually!
  14. syntax = 'proto2';
  15. package k8s.io.api.batch.v2alpha1;
  16. import "k8s.io/api/batch/v1/generated.proto";
  17. import "k8s.io/api/core/v1/generated.proto";
  18. import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
  19. import "k8s.io/apimachinery/pkg/runtime/generated.proto";
  20. import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
  21. // Package-wide variables from generator "generated".
  22. option go_package = "v2alpha1";
  23. // CronJob represents the configuration of a single cron job.
  24. message CronJob {
  25. // Standard object's metadata.
  26. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  27. // +optional
  28. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  29. // Specification of the desired behavior of a cron job, including the schedule.
  30. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  31. // +optional
  32. optional CronJobSpec spec = 2;
  33. // Current status of a cron job.
  34. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  35. // +optional
  36. optional CronJobStatus status = 3;
  37. }
  38. // CronJobList is a collection of cron jobs.
  39. message CronJobList {
  40. // Standard list metadata.
  41. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  42. // +optional
  43. optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;
  44. // items is the list of CronJobs.
  45. repeated CronJob items = 2;
  46. }
  47. // CronJobSpec describes how the job execution will look like and when it will actually run.
  48. message CronJobSpec {
  49. // The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.
  50. optional string schedule = 1;
  51. // Optional deadline in seconds for starting the job if it misses scheduled
  52. // time for any reason. Missed jobs executions will be counted as failed ones.
  53. // +optional
  54. optional int64 startingDeadlineSeconds = 2;
  55. // Specifies how to treat concurrent executions of a Job.
  56. // Valid values are:
  57. // - "Allow" (default): allows CronJobs to run concurrently;
  58. // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
  59. // - "Replace": cancels currently running job and replaces it with a new one
  60. // +optional
  61. optional string concurrencyPolicy = 3;
  62. // This flag tells the controller to suspend subsequent executions, it does
  63. // not apply to already started executions. Defaults to false.
  64. // +optional
  65. optional bool suspend = 4;
  66. // Specifies the job that will be created when executing a CronJob.
  67. optional JobTemplateSpec jobTemplate = 5;
  68. // The number of successful finished jobs to retain.
  69. // This is a pointer to distinguish between explicit zero and not specified.
  70. // +optional
  71. optional int32 successfulJobsHistoryLimit = 6;
  72. // The number of failed finished jobs to retain.
  73. // This is a pointer to distinguish between explicit zero and not specified.
  74. // +optional
  75. optional int32 failedJobsHistoryLimit = 7;
  76. }
  77. // CronJobStatus represents the current state of a cron job.
  78. message CronJobStatus {
  79. // A list of pointers to currently running jobs.
  80. // +optional
  81. repeated k8s.io.api.core.v1.ObjectReference active = 1;
  82. // Information when was the last time the job was successfully scheduled.
  83. // +optional
  84. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScheduleTime = 4;
  85. }
  86. // JobTemplate describes a template for creating copies of a predefined pod.
  87. message JobTemplate {
  88. // Standard object's metadata.
  89. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  90. // +optional
  91. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  92. // Defines jobs that will be created from this template.
  93. // https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  94. // +optional
  95. optional JobTemplateSpec template = 2;
  96. }
  97. // JobTemplateSpec describes the data a Job should have when created from a template
  98. message JobTemplateSpec {
  99. // Standard object's metadata of the jobs created from this template.
  100. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  101. // +optional
  102. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  103. // Specification of the desired behavior of the job.
  104. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  105. // +optional
  106. optional k8s.io.api.batch.v1.JobSpec spec = 2;
  107. }