pkg/scheduler/framework/:fix unconsistent comments and make log more clear
This commit is contained in:
@@ -18,8 +18,6 @@ package prebind
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
framework "k8s.io/kubernetes/pkg/scheduler/framework/v1alpha1"
|
||||
@@ -42,7 +40,7 @@ func (sr StatelessPreBindExample) Name() string {
|
||||
// PreBind is the functions invoked by the framework at "prebind" extension point.
|
||||
func (sr StatelessPreBindExample) PreBind(ctx context.Context, state *framework.CycleState, pod *v1.Pod, nodeName string) *framework.Status {
|
||||
if pod == nil {
|
||||
return framework.NewStatus(framework.Error, fmt.Sprintf("pod cannot be nil"))
|
||||
return framework.NewStatus(framework.Error, "pod cannot be nil")
|
||||
}
|
||||
if pod.Namespace != "foo" {
|
||||
return framework.NewStatus(framework.Unschedulable, "only pods from 'foo' namespace are allowed")
|
||||
|
Reference in New Issue
Block a user