Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve cronjob concurrency policy doc #54920

Merged
merged 1 commit into from
Nov 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -65861,7 +65861,7 @@
],
"properties": {
"concurrencyPolicy": {
"description": "Specifies how to treat concurrent executions of a Job. Defaults to Allow.",
"description": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one",
"type": "string"
},
"failedJobsHistoryLimit": {
Expand Down Expand Up @@ -65996,7 +65996,7 @@
],
"properties": {
"concurrencyPolicy": {
"description": "Specifies how to treat concurrent executions of a Job. Defaults to Allow.",
"description": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one",
"type": "string"
},
"failedJobsHistoryLimit": {
Expand Down
2 changes: 1 addition & 1 deletion api/swagger-spec/batch_v1beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@
},
"concurrencyPolicy": {
"type": "string",
"description": "Specifies how to treat concurrent executions of a Job. Defaults to Allow."
"description": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one"
},
"suspend": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion api/swagger-spec/batch_v2alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@
},
"concurrencyPolicy": {
"type": "string",
"description": "Specifies how to treat concurrent executions of a Job. Defaults to Allow."
"description": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one"
},
"suspend": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/batch/v1beta1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -3407,7 +3407,7 @@ <h3 id="_v1beta1_cronjobspec">v1beta1.CronJobSpec</h3>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">concurrencyPolicy</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies how to treat concurrent executions of a Job. Defaults to Allow.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn&#8217;t finished yet; - "Replace": cancels currently running job and replaces it with a new one</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
Expand Down
2 changes: 1 addition & 1 deletion docs/api-reference/batch/v2alpha1/definitions.html
Original file line number Diff line number Diff line change
Expand Up @@ -2173,7 +2173,7 @@ <h3 id="_v2alpha1_cronjobspec">v2alpha1.CronJobSpec</h3>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">concurrencyPolicy</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies how to treat concurrent executions of a Job. Defaults to Allow.</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">Specifies how to treat concurrent executions of a Job. Valid values are: - "Allow" (default): allows CronJobs to run concurrently; - "Forbid": forbids concurrent runs, skipping next run if previous run hasn&#8217;t finished yet; - "Replace": cancels currently running job and replaces it with a new one</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">false</p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">string</p></td>
<td class="tableblock halign-left valign-top"></td>
Expand Down
5 changes: 4 additions & 1 deletion pkg/apis/batch/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,10 @@ type CronJobSpec struct {
StartingDeadlineSeconds *int64

// Specifies how to treat concurrent executions of a Job.
// Defaults to Allow.
// Valid values are:
// - "Allow" (default): allows CronJobs to run concurrently;
// - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
// - "Replace": cancels currently running job and replaces it with a new one
// +optional
ConcurrencyPolicy ConcurrencyPolicy

Expand Down
5 changes: 4 additions & 1 deletion staging/src/k8s.io/api/batch/v1beta1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion staging/src/k8s.io/api/batch/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ type CronJobSpec struct {
StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"`

// Specifies how to treat concurrent executions of a Job.
// Defaults to Allow.
// Valid values are:
// - "Allow" (default): allows CronJobs to run concurrently;
// - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
// - "Replace": cancels currently running job and replaces it with a new one
// +optional
ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var map_CronJobSpec = map[string]string{
"": "CronJobSpec describes how the job execution will look like and when it will actually run.",
"schedule": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.",
"startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.",
"concurrencyPolicy": "Specifies how to treat concurrent executions of a Job. Defaults to Allow.",
"concurrencyPolicy": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one",
"suspend": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.",
"jobTemplate": "Specifies the job that will be created when executing a CronJob.",
"successfulJobsHistoryLimit": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified. Defaults to 3.",
Expand Down
5 changes: 4 additions & 1 deletion staging/src/k8s.io/api/batch/v2alpha1/generated.proto

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion staging/src/k8s.io/api/batch/v2alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ type CronJobSpec struct {
StartingDeadlineSeconds *int64 `json:"startingDeadlineSeconds,omitempty" protobuf:"varint,2,opt,name=startingDeadlineSeconds"`

// Specifies how to treat concurrent executions of a Job.
// Defaults to Allow.
// Valid values are:
// - "Allow" (default): allows CronJobs to run concurrently;
// - "Forbid": forbids concurrent runs, skipping next run if previous run hasn't finished yet;
// - "Replace": cancels currently running job and replaces it with a new one
// +optional
ConcurrencyPolicy ConcurrencyPolicy `json:"concurrencyPolicy,omitempty" protobuf:"bytes,3,opt,name=concurrencyPolicy,casttype=ConcurrencyPolicy"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var map_CronJobSpec = map[string]string{
"": "CronJobSpec describes how the job execution will look like and when it will actually run.",
"schedule": "The schedule in Cron format, see https://en.wikipedia.org/wiki/Cron.",
"startingDeadlineSeconds": "Optional deadline in seconds for starting the job if it misses scheduled time for any reason. Missed jobs executions will be counted as failed ones.",
"concurrencyPolicy": "Specifies how to treat concurrent executions of a Job. Defaults to Allow.",
"concurrencyPolicy": "Specifies how to treat concurrent executions of a Job. Valid values are: - \"Allow\" (default): allows CronJobs to run concurrently; - \"Forbid\": forbids concurrent runs, skipping next run if previous run hasn't finished yet; - \"Replace\": cancels currently running job and replaces it with a new one",
"suspend": "This flag tells the controller to suspend subsequent executions, it does not apply to already started executions. Defaults to false.",
"jobTemplate": "Specifies the job that will be created when executing a CronJob.",
"successfulJobsHistoryLimit": "The number of successful finished jobs to retain. This is a pointer to distinguish between explicit zero and not specified.",
Expand Down