Use PreferAvoidPods annotation to avoid pods being scheduled to specific node.
1. define PreferAvoidPods annotation 2. add PreferAvoidPodsPriority 3. validate AvoidPods in node annotations
This commit is contained in:
@@ -2008,6 +2008,34 @@ type AttachedVolume struct {
|
||||
DevicePath string `json:"devicePath"`
|
||||
}
|
||||
|
||||
// AvoidPods describes pods that should avoid this node. This is the value for a
|
||||
// Node annotation with key scheduler.alpha.kubernetes.io/preferAvoidPods and
|
||||
// will eventually become a field of NodeStatus.
|
||||
type AvoidPods struct {
|
||||
// Bounded-sized list of signatures of pods that should avoid this node, sorted
|
||||
// in timestamp order from oldest to newest. Size of the slice is unspecified.
|
||||
PreferAvoidPods []PreferAvoidPodsEntry `json:"preferAvoidPods,omitempty"`
|
||||
}
|
||||
|
||||
// Describes a class of pods that should avoid this node.
|
||||
type PreferAvoidPodsEntry struct {
|
||||
// The class of pods.
|
||||
PodSignature PodSignature `json:"podSignature"`
|
||||
// Time at which this entry was added to the list.
|
||||
EvictionTime unversioned.Time `json:"evictionTime,omitempty"`
|
||||
// (brief) reason why this entry was added to the list.
|
||||
Reason string `json:"reason,omitempty"`
|
||||
// Human readable message indicating why this entry was added to the list.
|
||||
Message string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
// Describes the class of pods that should avoid this node.
|
||||
// Exactly one field should be set.
|
||||
type PodSignature struct {
|
||||
// Reference to controller whose pods should avoid this node.
|
||||
PodController *OwnerReference `json:"podController,omitempty"`
|
||||
}
|
||||
|
||||
// Describe a container image
|
||||
type ContainerImage struct {
|
||||
// Names by which this image is known.
|
||||
|
Reference in New Issue
Block a user