mirror of
https://github.com/kubernetes/client-go.git
synced 2025-06-26 15:12:06 +00:00
Merge pull request #98727 from adtac/suspend
batch API: add suspended job Kubernetes-commit: a0341d7471c238acd03e1923161b4a2671a7fe2d
This commit is contained in:
commit
c2779356a2
2
Godeps/Godeps.json
generated
2
Godeps/Godeps.json
generated
@ -468,7 +468,7 @@
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/api",
|
||||
"Rev": "1fcb2aaecb7d"
|
||||
"Rev": "e466978b15bd"
|
||||
},
|
||||
{
|
||||
"ImportPath": "k8s.io/apimachinery",
|
||||
|
@ -36,6 +36,7 @@ type JobSpecApplyConfiguration struct {
|
||||
Template *corev1.PodTemplateSpecApplyConfiguration `json:"template,omitempty"`
|
||||
TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`
|
||||
CompletionMode *batchv1.CompletionMode `json:"completionMode,omitempty"`
|
||||
Suspend *bool `json:"suspend,omitempty"`
|
||||
}
|
||||
|
||||
// JobSpecApplyConfiguration constructs an declarative configuration of the JobSpec type for use with
|
||||
@ -115,3 +116,11 @@ func (b *JobSpecApplyConfiguration) WithCompletionMode(value batchv1.CompletionM
|
||||
b.CompletionMode = &value
|
||||
return b
|
||||
}
|
||||
|
||||
// WithSuspend sets the Suspend field in the declarative configuration to the given value
|
||||
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
|
||||
// If called multiple times, the Suspend field is set to the value of the last call.
|
||||
func (b *JobSpecApplyConfiguration) WithSuspend(value bool) *JobSpecApplyConfiguration {
|
||||
b.Suspend = &value
|
||||
return b
|
||||
}
|
||||
|
4
go.mod
4
go.mod
@ -27,7 +27,7 @@ require (
|
||||
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
|
||||
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d
|
||||
golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba
|
||||
k8s.io/api v0.0.0-20210309104520-1fcb2aaecb7d
|
||||
k8s.io/api v0.0.0-20210309104521-e466978b15bd
|
||||
k8s.io/apimachinery v0.0.0-20210308211950-8e4c0a57a00a
|
||||
k8s.io/klog/v2 v2.5.0
|
||||
k8s.io/utils v0.0.0-20201110183641-67b214c5f920
|
||||
@ -35,6 +35,6 @@ require (
|
||||
)
|
||||
|
||||
replace (
|
||||
k8s.io/api => k8s.io/api v0.0.0-20210309104520-1fcb2aaecb7d
|
||||
k8s.io/api => k8s.io/api v0.0.0-20210309104521-e466978b15bd
|
||||
k8s.io/apimachinery => k8s.io/apimachinery v0.0.0-20210308211950-8e4c0a57a00a
|
||||
)
|
||||
|
2
go.sum
2
go.sum
@ -426,7 +426,7 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh
|
||||
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
|
||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
||||
honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
|
||||
k8s.io/api v0.0.0-20210309104520-1fcb2aaecb7d/go.mod h1:wmLwhR2SwFe78A9h7N5gtJ1OIL89Ben/YCzEr5hd2ss=
|
||||
k8s.io/api v0.0.0-20210309104521-e466978b15bd/go.mod h1:wmLwhR2SwFe78A9h7N5gtJ1OIL89Ben/YCzEr5hd2ss=
|
||||
k8s.io/apimachinery v0.0.0-20210308211950-8e4c0a57a00a/go.mod h1:2LERmYT9PI3b4uQt87vnb2UVkblBDzZhucIf8PxvJ2o=
|
||||
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
|
||||
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE=
|
||||
|
Loading…
Reference in New Issue
Block a user