volcano.sh/volcano@v1.9.0/pkg/scheduler/api/devices/util.go (about)

     1  /*
     2  Licensed under the Apache License, Version 2.0 (the "License");
     3  you may not use this file except in compliance with the License.
     4  You may obtain a copy of the License at
     5  
     6      http://www.apache.org/licenses/LICENSE-2.0
     7  
     8  Unless required by applicable law or agreed to in writing, software
     9  distributed under the License is distributed on an "AS IS" BASIS,
    10  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    11  See the License for the specific language governing permissions and
    12  limitations under the License.
    13  */
    14  
    15  package devices
    16  
    17  // These are predefined codes used in a Status.
    18  const (
    19  	// Success means that plugin ran correctly and found pod schedulable.
    20  	// NOTE: A nil status is also considered as "Success".
    21  	Success int = iota
    22  	// Error is used for internal plugin errors, unexpected input, etc.
    23  	Error
    24  	// Unschedulable is used when a plugin finds a pod unschedulable. The scheduler might attempt to
    25  	// preempt other pods to get this pod scheduled. Use UnschedulableAndUnresolvable to make the
    26  	// scheduler skip preemption.
    27  	// The accompanying status message should explain why the pod is unschedulable.
    28  	Unschedulable
    29  	// UnschedulableAndUnresolvable is used when a plugin finds a pod unschedulable and
    30  	// preemption would not change anything. Plugins should return Unschedulable if it is possible
    31  	// that the pod can get scheduled with preemption.
    32  	// The accompanying status message should explain why the pod is unschedulable.
    33  	UnschedulableAndUnresolvable
    34  	// Wait is used when a Permit plugin finds a pod scheduling should wait.
    35  	Wait
    36  	// Skip is used when a Bind plugin chooses to skip binding.
    37  	Skip
    38  )