Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

feat: Add successpolicy #181

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/apis/common/v1/openapi_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions pkg/apis/common/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ type RunPolicy struct {
// Default to Running.
CleanPodPolicy *CleanPodPolicy `json:"cleanPodPolicy,omitempty"`

SuccessPolicy *SuccessPolicy `json:"successPolicy,omitempty"`

// TTLSecondsAfterFinished is the TTL to clean up jobs.
// It may take extra ReconcilePeriod seconds for the cleanup, since
// reconcile gets called periodically.
Expand All @@ -198,6 +200,13 @@ type RunPolicy struct {
SchedulingPolicy *SchedulingPolicy `json:"schedulingPolicy,omitempty"`
}

type SuccessPolicy string

const (
SuccessPolicyDefault SuccessPolicy = ""
SuccessPolicyAllWorkers SuccessPolicy = "AllWorkers"
)

// +k8s:openapi-gen=true
// SchedulingPolicy encapsulates various scheduling policies of the distributed training
// job, for example `minAvailable` for gang-scheduling.
Expand Down
5 changes: 5 additions & 0 deletions pkg/apis/common/v1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.