Skip to content

Commit

Permalink
skip edge node in nrt
Browse files Browse the repository at this point in the history
  • Loading branch information
ruimingxie committed Jan 3, 2024
1 parent a7633a1 commit c5c3beb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/plugins/noderesourcetopology/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
6 changes: 6 additions & 0 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit c5c3beb

Please sign in to comment.