volcano.sh/apis@v1.8.2/pkg/apis/bus/v1alpha1/events.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  // Event represent the phase of Job, e.g. pod-failed.
    20  type Event string
    21  
    22  const (
    23  
    24  	// AnyEvent means all event
    25  	AnyEvent Event = "*"
    26  
    27  	// PodFailedEvent is triggered if Pod was failed
    28  	PodFailedEvent Event = "PodFailed"
    29  
    30  	// PodEvictedEvent is triggered if Pod was deleted
    31  	PodEvictedEvent Event = "PodEvicted"
    32  
    33  	// JobUnknownEvent These below are several events can lead to job 'Unknown'
    34  	// 1. Task Unschedulable, this is triggered when part of
    35  	//    pods can't be scheduled while some are already running in gang-scheduling case.
    36  	JobUnknownEvent Event = "Unknown"
    37  
    38  	// TaskCompletedEvent is triggered if the 'Replicas' amount of pods in one task are succeed
    39  	TaskCompletedEvent Event = "TaskCompleted"
    40  
    41  	// Note: events below are used internally, should not be used by users.
    42  
    43  	// OutOfSyncEvent is triggered if Pod/Job is updated(add/update/delete)
    44  	OutOfSyncEvent Event = "OutOfSync"
    45  
    46  	// CommandIssuedEvent is triggered if a command is raised by user
    47  	CommandIssuedEvent Event = "CommandIssued"
    48  
    49  	// JobUpdatedEvent is triggered if Job is updated, currently only scale up/down
    50  	JobUpdatedEvent Event = "JobUpdated"
    51  
    52  	// TaskFailedEvent is triggered when task finished unexpected.
    53  	TaskFailedEvent Event = "TaskFailed"
    54  )