mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Modified the Filter interface to pass in nodeinfo instead of node name.
This is necessary to support preemption, which relies on passing modified nodeinfo objects to the filters to simulate evicting lower-priority pods.
This commit is contained in:
@@ -311,9 +311,9 @@ func (f *framework) RunPreFilterPlugins(
|
||||
// given node is not suitable for running pod.
|
||||
// Meanwhile, the failure message and status are set for the given node.
|
||||
func (f *framework) RunFilterPlugins(pc *PluginContext,
|
||||
pod *v1.Pod, nodeName string) *Status {
|
||||
pod *v1.Pod, nodeInfo *schedulernodeinfo.NodeInfo) *Status {
|
||||
for _, pl := range f.filterPlugins {
|
||||
status := pl.Filter(pc, pod, nodeName)
|
||||
status := pl.Filter(pc, pod, nodeInfo)
|
||||
if !status.IsSuccess() {
|
||||
if !status.IsUnschedulable() {
|
||||
errMsg := fmt.Sprintf("error while running %q filter plugin for pod %q: %v",
|
||||
|
||||
Reference in New Issue
Block a user