Skip to content

Commit

Permalink
Add TTLAfterFinished alpha feature
Browse files Browse the repository at this point in the history
Kubernetes-commit: 209b32684ea76c5a49ebc68b9990746bbd42c414
  • Loading branch information
janetkuo authored and k8s-publishing-bot committed Jul 24, 2018
1 parent ca88bee commit 186b595
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions batch/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ type JobSpec struct {
// Describes the pod that will be created when executing a job.
// More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
Template v1.PodTemplateSpec `json:"template" protobuf:"bytes,6,opt,name=template"`

// ttlSecondsAfterFinished limits the lifetime of a Job that has finished
// execution (either Complete or Failed). If this field is set,
// ttlSecondsAfterFinished after the Job finishes, it is eligible to be
// automatically deleted. When the Job is being deleted, its lifecycle
// guarantees (e.g. finalizers) will be honored. If this field is unset,
// the Job won't be automatically deleted. If this field is set to zero,
// the Job becomes eligible to be deleted immediately after it finishes.
// This field is alpha-level and is only honored by servers that enable the
// TTLAfterFinished feature.
// +optional
TTLSecondsAfterFinished *int32 `json:"ttlSecondsAfterFinished,omitempty"`
}

// JobStatus represents the current state of a Job.
Expand Down

0 comments on commit 186b595

Please sign in to comment.