@@ -97,6 +97,8 @@ const (
97
97
OutOfSyncEvent Event = "OutOfSync"
98
98
// CommandIssuedEvent is triggered if a command is raised by user
99
99
CommandIssuedEvent Event = "CommandIssued"
100
+ // TaskCompletedEvent is triggered if the 'Replicas' amount of pods in one task are succeed
101
+ TaskCompletedEvent Event = "TaskCompleted"
100
102
)
101
103
102
104
// Action is the action that Job controller will take according to the event.
@@ -114,6 +116,8 @@ const (
114
116
// TerminateJobAction if this action is set, the whole job wil be terminated
115
117
// and can not be resumed: all Pod of Job will be evicted, and no Pod will be recreated.
116
118
TerminateJobAction Action = "TerminateJob"
119
+ //CompleteJobAction if this action is set, the unfinished pods will be killed, job completed.
120
+ CompleteJobAction Action = "CompleteJob"
117
121
118
122
// ResumeJobAction is the action to resume an aborted job.
119
123
ResumeJobAction Action = "ResumeJob"
@@ -170,6 +174,8 @@ const (
170
174
Running JobPhase = "Running"
171
175
// Restarting is the phase that the Job is restarted, waiting for pod releasing and recreating
172
176
Restarting JobPhase = "Restarting"
177
+ // Completing is the phase that required tasks of job are completed, job starts to clean up
178
+ Completing JobPhase = "Completing"
173
179
// Completed is the phase that all tasks of Job are completed
174
180
Completed JobPhase = "Completed"
175
181
// Terminating is the phase that the Job is terminated, waiting for releasing pods
0 commit comments