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
df124fed
Commit
df124fed
authored
Jul 13, 2016
by
Maciej Szulik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ScheduledJob suspend being pointer leftovers
parent
cadee467
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
2 deletions
+13
-2
fuzzer.go
pkg/api/testing/fuzzer.go
+8
-0
types.go
pkg/apis/batch/types.go
+1
-1
defaults.go
pkg/apis/batch/v2alpha1/defaults.go
+3
-0
types.go
pkg/apis/batch/v2alpha1/types.go
+1
-1
No files found.
pkg/api/testing/fuzzer.go
View file @
df124fed
...
...
@@ -169,6 +169,14 @@ func FuzzerFor(t *testing.T, version unversioned.GroupVersion, src rand.Source)
j
.
ManualSelector
=
nil
}
},
func
(
sj
*
batch
.
ScheduledJobSpec
,
c
fuzz
.
Continue
)
{
c
.
FuzzNoCustom
(
sj
)
suspend
:=
c
.
RandBool
()
sj
.
Suspend
=
&
suspend
sds
:=
int64
(
c
.
RandUint64
())
sj
.
StartingDeadlineSeconds
=
&
sds
sj
.
Schedule
=
c
.
RandString
()
},
func
(
cp
*
batch
.
ConcurrencyPolicy
,
c
fuzz
.
Continue
)
{
policies
:=
[]
batch
.
ConcurrencyPolicy
{
batch
.
AllowConcurrent
,
batch
.
ForbidConcurrent
,
batch
.
ReplaceConcurrent
}
*
cp
=
policies
[
c
.
Rand
.
Intn
(
len
(
policies
))]
...
...
pkg/apis/batch/types.go
View file @
df124fed
...
...
@@ -209,7 +209,7 @@ type ScheduledJobSpec struct {
// Suspend flag tells the controller to suspend subsequent executions, it does
// not apply to already started executions. Defaults to false.
Suspend
*
bool
`json:"suspend"`
Suspend
*
bool
`json:"suspend
,omitempty
"`
// JobTemplate is the object that describes the job that will be created when
// executing a ScheduledJob.
...
...
pkg/apis/batch/v2alpha1/defaults.go
View file @
df124fed
...
...
@@ -46,4 +46,7 @@ func SetDefaults_ScheduledJob(obj *ScheduledJob) {
if
obj
.
Spec
.
ConcurrencyPolicy
==
""
{
obj
.
Spec
.
ConcurrencyPolicy
=
AllowConcurrent
}
if
obj
.
Spec
.
Suspend
==
nil
{
obj
.
Spec
.
Suspend
=
new
(
bool
)
}
}
pkg/apis/batch/v2alpha1/types.go
View file @
df124fed
...
...
@@ -211,7 +211,7 @@ type ScheduledJobSpec struct {
// Suspend flag tells the controller to suspend subsequent executions, it does
// not apply to already started executions. Defaults to false.
Suspend
*
bool
`json:"suspend" protobuf:"varint,4,opt,name=suspend"`
Suspend
*
bool
`json:"suspend
,omitempty
" protobuf:"varint,4,opt,name=suspend"`
// JobTemplate is the object that describes the job that will be created when
// executing a ScheduledJob.
...
...
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