manirajv06 commented on code in PR #572:
URL: https://github.com/apache/yunikorn-k8shim/pull/572#discussion_r1173314830
##########
test/e2e/framework/helpers/k8s/k8s_utils.go:
##########
@@ -1292,10 +1292,22 @@ func IsMasterNode(node *v1.Node) bool {
return true
}
}
-
return false
}
+func IsComputeNode(node *v1.Node) bool {
+ roleNodeLabelExists := false
+ for labelKey, labelValue := range node.Labels {
+ if labelKey == common.RoleNodeLabel {
+ roleNodeLabelExists = true
+ if _, ok := common.ComputeNodeLabels[labelValue]; ok {
+ return true
+ }
+ }
+ }
+ return !roleNodeLabelExists
Review Comment:
There is no "role" node label in kind clusters setup. "role" node label is
available in aks/eks clsusters. IsMasterNode method is good enough for Kind
clusters to separate out the master from worker nodes. IsComputeNode is mainly
for separate out the compute worker nodes from infra worker nodes in aks/eks
clusters. Just to satisfy kind clusters or any other cluster setup (where there
is no "role" node label), we need to return true here (!roleNodeLabelExists).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]