-
Notifications
You must be signed in to change notification settings - Fork 997
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2916 from wangyang0616/feature_predicate_suport_p…
…reempt Refactor PredicateFn for allocate and preempt actions
- Loading branch information
Showing
22 changed files
with
385 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package devices | ||
|
||
// These are predefined codes used in a Status. | ||
const ( | ||
// Success means that plugin ran correctly and found pod schedulable. | ||
// NOTE: A nil status is also considered as "Success". | ||
Success int = iota | ||
// Error is used for internal plugin errors, unexpected input, etc. | ||
Error | ||
// Unschedulable is used when a plugin finds a pod unschedulable. The scheduler might attempt to | ||
// preempt other pods to get this pod scheduled. Use UnschedulableAndUnresolvable to make the | ||
// scheduler skip preemption. | ||
// The accompanying status message should explain why the pod is unschedulable. | ||
Unschedulable | ||
// UnschedulableAndUnresolvable is used when a plugin finds a pod unschedulable and | ||
// preemption would not change anything. Plugins should return Unschedulable if it is possible | ||
// that the pod can get scheduled with preemption. | ||
// The accompanying status message should explain why the pod is unschedulable. | ||
UnschedulableAndUnresolvable | ||
// Wait is used when a Permit plugin finds a pod scheduling should wait. | ||
Wait | ||
// Skip is used when a Bind plugin chooses to skip binding. | ||
Skip | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.