Commit a518a273 authored by Eric Tune's avatar Eric Tune

Merge pull request #14417 from soltysh/issue14385

Issue 14385: job's parallelism defaults to completions.
parents 43b37204 a984eb37
......@@ -94,8 +94,7 @@ func addDefaultingFuncs() {
obj.Spec.Completions = &completions
}
if obj.Spec.Parallelism == nil {
parallelism := 2
obj.Spec.Parallelism = &parallelism
obj.Spec.Parallelism = obj.Spec.Completions
}
},
)
......
......@@ -194,7 +194,7 @@ func TestSetDefaultJob(t *testing.T) {
Spec: JobSpec{
Selector: map[string]string{"job": "selector"},
Completions: newInt(1),
Parallelism: newInt(2),
Parallelism: newInt(1),
},
}
tests := []*Job{
......@@ -228,7 +228,7 @@ func TestSetDefaultJob(t *testing.T) {
// selector from template labels, completions - default, parallelism set explicitly
{
Spec: JobSpec{
Parallelism: newInt(2),
Parallelism: newInt(1),
Template: &v1.PodTemplateSpec{
ObjectMeta: v1.ObjectMeta{
Labels: map[string]string{"job": "selector"},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment