Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
a518a273
Commit
a518a273
authored
Sep 24, 2015
by
Eric Tune
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14417 from soltysh/issue14385
Issue 14385: job's parallelism defaults to completions.
parents
43b37204
a984eb37
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
defaults.go
pkg/apis/experimental/v1/defaults.go
+1
-2
defaults_test.go
pkg/apis/experimental/v1/defaults_test.go
+2
-2
No files found.
pkg/apis/experimental/v1/defaults.go
View file @
a518a273
...
...
@@ -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
}
},
)
...
...
pkg/apis/experimental/v1/defaults_test.go
View file @
a518a273
...
...
@@ -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"
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment