volcano.sh/apis@v1.8.2/pkg/apis/bus/v1alpha1/actions.go (about) 1 /* 2 Copyright 2020 The Volcano Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package v1alpha1 18 19 // Action is the action that Job controller will take according to the event. 20 type Action string 21 22 const ( 23 24 // AbortJobAction if this action is set, the whole job will be aborted: 25 // all Pod of Job will be evicted, and no Pod will be recreated 26 AbortJobAction Action = "AbortJob" 27 28 // RestartJobAction if this action is set, the whole job will be restarted 29 RestartJobAction Action = "RestartJob" 30 31 // RestartTaskAction if this action is set, only the task will be restarted; default action. 32 // This action can not work together with job level events, e.g. JobUnschedulable 33 RestartTaskAction Action = "RestartTask" 34 35 // TerminateJobAction if this action is set, the whole job wil be terminated 36 // and can not be resumed: all Pod of Job will be evicted, and no Pod will be recreated. 37 TerminateJobAction Action = "TerminateJob" 38 39 // CompleteJobAction if this action is set, the unfinished pods will be killed, job completed. 40 CompleteJobAction Action = "CompleteJob" 41 42 // ResumeJobAction is the action to resume an aborted job. 43 ResumeJobAction Action = "ResumeJob" 44 45 // Note: actions below are only used internally, should not be used by users. 46 47 // SyncJobAction is the action to sync Job/Pod status. 48 SyncJobAction Action = "SyncJob" 49 50 // EnqueueAction is the action to sync Job inqueue status. 51 EnqueueAction Action = "EnqueueJob" 52 53 // SyncQueueAction is the action to sync queue status. 54 SyncQueueAction Action = "SyncQueue" 55 56 // OpenQueueAction is the action to open queue 57 OpenQueueAction Action = "OpenQueue" 58 59 // CloseQueueAction is the action to close queue 60 CloseQueueAction Action = "CloseQueue" 61 )