mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-12 22:49:23 +00:00
batch: add suspended job
Signed-off-by: Adhityaa Chandrasekar <adtac@google.com> Kubernetes-commit: a0844da8f799e6f360193ecfd02c84d61a62958b
This commit is contained in:
parent
aa6ddc8e87
commit
5ca42dac08
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user