diff --git a/pkg/plugins/noderesourcetopology/filter.go b/pkg/plugins/noderesourcetopology/filter.go index 1895a14..4f4ceae 100644 --- a/pkg/plugins/noderesourcetopology/filter.go +++ b/pkg/plugins/noderesourcetopology/filter.go @@ -57,7 +57,7 @@ func (tm *TopologyMatch) Filter( return framework.NewStatus(framework.Error, "node(s) not found") } - if utils.IsDaemonsetPod(pod) || len(s.targetContainerIndices) == 0 { + if utils.IsDaemonsetPod(pod) || len(s.targetContainerIndices) == 0 || utils.IsEdgeNode(nodeInfo.Node()) { return nil } diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 22a15f1..47d2f30 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -66,3 +66,9 @@ func NormalizeScore(value, max, min int64) int64 { return value } + +// IsEdgeNode judges if this node is an edge node. +func IsEdgeNode(node *corev1.Node) bool { + _, ok := node.Labels["superedge.io/edge-node"] + return ok +}