Skip to content

Commit

Permalink
Merge pull request #100188 from alculquicondor/job-api-fixes
Browse files Browse the repository at this point in the history
Only default Job fields when feature gates are enabled

Kubernetes-commit: b345913c5eb794ded1a577db66e9f566eb8e5957
  • Loading branch information
k8s-publishing-bot committed Mar 15, 2021
2 parents 51a1c55 + 862c319 commit fd88418
Show file tree
Hide file tree
Showing 21 changed files with 143 additions and 129 deletions.
189 changes: 97 additions & 92 deletions batch/v1/generated.pb.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion batch/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ type JobSpec struct {
// If the Job controller observes a mode that it doesn't recognize, the
// controller skips updates for the Job.
// +optional
CompletionMode CompletionMode `json:"completionMode,omitempty" protobuf:"bytes,9,opt,name=completionMode,casttype=CompletionMode"`
CompletionMode *CompletionMode `json:"completionMode,omitempty" protobuf:"bytes,9,opt,name=completionMode,casttype=CompletionMode"`

// Suspend specifies whether the Job controller should create Pods or not. If
// a Job is created with suspend set to true, no Pods are created by the Job
Expand Down
5 changes: 5 additions & 0 deletions batch/v1/zz_generated.deepcopy.go

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

9 changes: 5 additions & 4 deletions testdata/HEAD/batch.v1.CronJob.json
Original file line number Diff line number Diff line change
Expand Up @@ -1577,19 +1577,20 @@
}
},
"ttlSecondsAfterFinished": -1285029915,
"suspend": true
"completionMode": "{ȃ騑ȫ(踶NJđƟÝɹ橽ƴåj}c殶",
"suspend": false
}
},
"successfulJobsHistoryLimit": 1729066291,
"failedJobsHistoryLimit": -908823020
"successfulJobsHistoryLimit": -2006986560,
"failedJobsHistoryLimit": -380889943
},
"status": {
"active": [
{
"kind": "505",
"namespace": "506",
"name": "507",
"uid": "`",
"uid": "暉Ŝ!ȣ绰",
"apiVersion": "508",
"resourceVersion": "509",
"fieldPath": "510"
Expand Down
Binary file modified testdata/HEAD/batch.v1.CronJob.pb
Binary file not shown.
9 changes: 5 additions & 4 deletions testdata/HEAD/batch.v1.CronJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ metadata:
uid: "7"
spec:
concurrencyPolicy: Hr鯹)晿<o,c鮽ort昍řČ扷5Ɨ
failedJobsHistoryLimit: -908823020
failedJobsHistoryLimit: -380889943
jobTemplate:
metadata:
annotations:
Expand Down Expand Up @@ -65,6 +65,7 @@ spec:
spec:
activeDeadlineSeconds: -1483125035702892746
backoffLimit: -1822122846
completionMode: '{ȃ騑ȫ(踶NJđƟÝɹ橽ƴåj}c殶'
completions: -106888179
manualSelector: true
parallelism: -856030588
Expand All @@ -74,7 +75,7 @@ spec:
operator: DoesNotExist
matchLabels:
2_kS91.e5K-_e63_-_3-n-_-__3u-.__P__.7U-Uo_4_-D7r__.am6-4_WE-_T: cd-2.-__E_Sv__26KX_R_.-.Nth._--S_4DAm
suspend: true
suspend: false
template:
metadata:
annotations:
Expand Down Expand Up @@ -1081,7 +1082,7 @@ spec:
ttlSecondsAfterFinished: -1285029915
schedule: "19"
startingDeadlineSeconds: -2555947251840004808
successfulJobsHistoryLimit: 1729066291
successfulJobsHistoryLimit: -2006986560
suspend: true
status:
active:
Expand All @@ -1091,4 +1092,4 @@ status:
name: "507"
namespace: "506"
resourceVersion: "509"
uid: '`'
uid: 暉Ŝ!ȣ绰
18 changes: 9 additions & 9 deletions testdata/HEAD/batch.v1.Job.json
Original file line number Diff line number Diff line change
Expand Up @@ -1530,23 +1530,23 @@
}
},
"ttlSecondsAfterFinished": 1020403419,
"completionMode": "ʉiUȡɭĮ庺%#囨q砅ƎXÄdƦ;",
"suspend": false
"completionMode": "\u003cƋlɋN磋镮ȺPÈɥ偁髕ģƗ鐫",
"suspend": true
},
"status": {
"conditions": [
{
"type": "氮怉ƥ;\"薑Ȣ#闬輙",
"status": "褅桃|",
"lastProbeTime": "2625-10-20T09:03:25Z",
"lastTransitionTime": "2222-01-27T15:06:59Z",
"type": "穌砊ʑȩ硘(ǒ[ȼ罦¦褅",
"status": "bCũw¼ ǫđ槴Ċį軠\u003e桼劑",
"lastProbeTime": "2377-08-03T07:30:10Z",
"lastTransitionTime": "2619-06-09T02:29:16Z",
"reason": "482",
"message": "483"
}
],
"active": -882920248,
"succeeded": -1163607463,
"failed": -758431192,
"active": 157401294,
"succeeded": -702718077,
"failed": 648978003,
"completedIndexes": "484"
}
}
Binary file modified testdata/HEAD/batch.v1.Job.pb
Binary file not shown.
18 changes: 9 additions & 9 deletions testdata/HEAD/batch.v1.Job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ metadata:
spec:
activeDeadlineSeconds: -5584804243908071872
backoffLimit: -783752440
completionMode: ʉiUȡɭĮ庺%#囨q砅ƎXÄdƦ;
completionMode: 汸<ƋlɋN磋镮ȺPÈɥ偁髕ģƗ鐫
completions: 1305381319
manualSelector: true
parallelism: 896585016
Expand All @@ -44,7 +44,7 @@ spec:
- 3_bQw.-dG6c-.x
matchLabels:
hjT9s-j41-0-6p-JFHn7y-74.-0MUORQQ.N4: 3L.u
suspend: false
suspend: true
template:
metadata:
annotations:
Expand Down Expand Up @@ -1046,14 +1046,14 @@ spec:
volumePath: "101"
ttlSecondsAfterFinished: 1020403419
status:
active: -882920248
active: 157401294
completedIndexes: "484"
conditions:
- lastProbeTime: "2625-10-20T09:03:25Z"
lastTransitionTime: "2222-01-27T15:06:59Z"
- lastProbeTime: "2377-08-03T07:30:10Z"
lastTransitionTime: "2619-06-09T02:29:16Z"
message: "483"
reason: "482"
status: 褅桃|
type: 氮怉ƥ;"薑Ȣ#闬輙
failed: -758431192
succeeded: -1163607463
status: bCũw¼ ǫđ槴Ċį軠>桼劑
type: 穌砊ʑȩ硘(ǒ[ȼ罦¦褅
failed: 648978003
succeeded: -702718077
9 changes: 5 additions & 4 deletions testdata/HEAD/batch.v1beta1.CronJob.json
Original file line number Diff line number Diff line change
Expand Up @@ -1577,19 +1577,20 @@
}
},
"ttlSecondsAfterFinished": -1285029915,
"suspend": true
"completionMode": "{ȃ騑ȫ(踶NJđƟÝɹ橽ƴåj}c殶",
"suspend": false
}
},
"successfulJobsHistoryLimit": 1729066291,
"failedJobsHistoryLimit": -908823020
"successfulJobsHistoryLimit": -2006986560,
"failedJobsHistoryLimit": -380889943
},
"status": {
"active": [
{
"kind": "505",
"namespace": "506",
"name": "507",
"uid": "`",
"uid": "暉Ŝ!ȣ绰",
"apiVersion": "508",
"resourceVersion": "509",
"fieldPath": "510"
Expand Down
Binary file modified testdata/HEAD/batch.v1beta1.CronJob.pb
Binary file not shown.
9 changes: 5 additions & 4 deletions testdata/HEAD/batch.v1beta1.CronJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ metadata:
uid: "7"
spec:
concurrencyPolicy: Hr鯹)晿<o,c鮽ort昍řČ扷5Ɨ
failedJobsHistoryLimit: -908823020
failedJobsHistoryLimit: -380889943
jobTemplate:
metadata:
annotations:
Expand Down Expand Up @@ -65,6 +65,7 @@ spec:
spec:
activeDeadlineSeconds: -1483125035702892746
backoffLimit: -1822122846
completionMode: '{ȃ騑ȫ(踶NJđƟÝɹ橽ƴåj}c殶'
completions: -106888179
manualSelector: true
parallelism: -856030588
Expand All @@ -74,7 +75,7 @@ spec:
operator: DoesNotExist
matchLabels:
2_kS91.e5K-_e63_-_3-n-_-__3u-.__P__.7U-Uo_4_-D7r__.am6-4_WE-_T: cd-2.-__E_Sv__26KX_R_.-.Nth._--S_4DAm
suspend: true
suspend: false
template:
metadata:
annotations:
Expand Down Expand Up @@ -1081,7 +1082,7 @@ spec:
ttlSecondsAfterFinished: -1285029915
schedule: "19"
startingDeadlineSeconds: -2555947251840004808
successfulJobsHistoryLimit: 1729066291
successfulJobsHistoryLimit: -2006986560
suspend: true
status:
active:
Expand All @@ -1091,4 +1092,4 @@ status:
name: "507"
namespace: "506"
resourceVersion: "509"
uid: '`'
uid: 暉Ŝ!ȣ绰
2 changes: 1 addition & 1 deletion testdata/HEAD/batch.v1beta1.JobTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@
}
},
"ttlSecondsAfterFinished": -2143422853,
"completionMode": "Ŀř岈ǎǏ]S5:œƌ嵃ǁǞŢm珢\\%",
"completionMode": "烡Z树Ȁ謁Ƹɮ-nʣž吞Ƞ唄",
"suspend": true
}
}
Expand Down
Binary file modified testdata/HEAD/batch.v1beta1.JobTemplate.pb
Binary file not shown.
2 changes: 1 addition & 1 deletion testdata/HEAD/batch.v1beta1.JobTemplate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ template:
spec:
activeDeadlineSeconds: -9086179100394185427
backoffLimit: -1796008812
completionMode: Ŀř岈ǎǏ]S5:œƌ嵃ǁǞŢm珢\%
completionMode: 烡Z树Ȁ謁Ƹɮ-nʣž吞Ƞ唄
completions: -1771909905
manualSelector: false
parallelism: -443114323
Expand Down
Binary file modified testdata/v1.19.0/batch.v1.Job.after_roundtrip.pb
Binary file not shown.
Binary file modified testdata/v1.19.0/batch.v1beta1.CronJob.after_roundtrip.pb
Binary file not shown.
Binary file modified testdata/v1.19.0/batch.v1beta1.JobTemplate.after_roundtrip.pb
Binary file not shown.
Binary file modified testdata/v1.20.0/batch.v1.Job.after_roundtrip.pb
Binary file not shown.
Binary file modified testdata/v1.20.0/batch.v1beta1.CronJob.after_roundtrip.pb
Binary file not shown.
Binary file modified testdata/v1.20.0/batch.v1beta1.JobTemplate.after_roundtrip.pb
Binary file not shown.

0 comments on commit fd88418

Please sign in to comment.