generated.proto 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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.v1beta1;
  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 = "k8s.io/api/batch/v1beta1";
  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. // The time zone name for the given schedule, see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones.
  52. // If not specified, this will default to the time zone of the kube-controller-manager process.
  53. // The set of valid time zone names and the time zone offset is loaded from the system-wide time zone
  54. // database by the API server during CronJob validation and the controller manager during execution.
  55. // If no system-wide time zone database can be found a bundled version of the database is used instead.
  56. // If the time zone name becomes invalid during the lifetime of a CronJob or due to a change in host
  57. // configuration, the controller will stop creating new new Jobs and will create a system event with the
  58. // reason UnknownTimeZone.
  59. // More information can be found in https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/#time-zones
  60. // +optional
  61. optional string timeZone = 8;
  62. // Optional deadline in seconds for starting the job if it misses scheduled
  63. // time for any reason. Missed jobs executions will be counted as failed ones.
  64. // +optional
  65. optional int64 startingDeadlineSeconds = 2;
  66. // Specifies how to treat concurrent executions of a Job.
  67. // Valid values are:
  68. //
  69. // - "Allow" (default): allows CronJobs to run concurrently;
  70. // - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
  71. // - "Replace": cancels currently running job and replaces it with a new one
  72. // +optional
  73. optional string concurrencyPolicy = 3;
  74. // This flag tells the controller to suspend subsequent executions, it does
  75. // not apply to already started executions. Defaults to false.
  76. // +optional
  77. optional bool suspend = 4;
  78. // Specifies the job that will be created when executing a CronJob.
  79. optional JobTemplateSpec jobTemplate = 5;
  80. // The number of successful finished jobs to retain.
  81. // This is a pointer to distinguish between explicit zero and not specified.
  82. // Defaults to 3.
  83. // +optional
  84. optional int32 successfulJobsHistoryLimit = 6;
  85. // The number of failed finished jobs to retain.
  86. // This is a pointer to distinguish between explicit zero and not specified.
  87. // Defaults to 1.
  88. // +optional
  89. optional int32 failedJobsHistoryLimit = 7;
  90. }
  91. // CronJobStatus represents the current state of a cron job.
  92. message CronJobStatus {
  93. // A list of pointers to currently running jobs.
  94. // +optional
  95. // +listType=atomic
  96. repeated k8s.io.api.core.v1.ObjectReference active = 1;
  97. // Information when was the last time the job was successfully scheduled.
  98. // +optional
  99. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScheduleTime = 4;
  100. // Information when was the last time the job successfully completed.
  101. // +optional
  102. optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastSuccessfulTime = 5;
  103. }
  104. // JobTemplateSpec describes the data a Job should have when created from a template
  105. message JobTemplateSpec {
  106. // Standard object's metadata of the jobs created from this template.
  107. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
  108. // +optional
  109. optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;
  110. // Specification of the desired behavior of the job.
  111. // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
  112. // +optional
  113. optional k8s.io.api.batch.v1.JobSpec spec = 2;
  114. }