mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
fix: update run filter plugin for consistency
This commit is contained in:
parent
feb64858aa
commit
859cac0595
@ -312,13 +312,12 @@ func (f *framework) RunPrefilterPlugins(
|
|||||||
// Meanwhile, the failure message and status are set for the given node.
|
// Meanwhile, the failure message and status are set for the given node.
|
||||||
func (f *framework) RunFilterPlugins(pc *PluginContext,
|
func (f *framework) RunFilterPlugins(pc *PluginContext,
|
||||||
pod *v1.Pod, nodeName string) *Status {
|
pod *v1.Pod, nodeName string) *Status {
|
||||||
|
for _, pl := range f.filterPlugins {
|
||||||
for _, p := range f.filterPlugins {
|
status := pl.Filter(pc, pod, nodeName)
|
||||||
status := p.Filter(pc, pod, nodeName)
|
|
||||||
if !status.IsSuccess() {
|
if !status.IsSuccess() {
|
||||||
if status.Code() != Unschedulable {
|
if status.Code() != Unschedulable {
|
||||||
errMsg := fmt.Sprintf("RunFilterPlugins: error while running %s filter plugin for pod %s: %s",
|
errMsg := fmt.Sprintf("RunFilterPlugins: error while running %v filter plugin for pod %v: %v",
|
||||||
p.Name(), pod.Name, status.Message())
|
pl.Name(), pod.Name, status.Message())
|
||||||
klog.Error(errMsg)
|
klog.Error(errMsg)
|
||||||
return NewStatus(Error, errMsg)
|
return NewStatus(Error, errMsg)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user