pkg/util
This commit is contained in:
@@ -18,12 +18,10 @@ package system
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
|
||||
"k8s.io/kubernetes/pkg/api"
|
||||
)
|
||||
|
||||
// TODO: find a better way of figuring out if given node is a registered master.
|
||||
func IsMasterNode(node *api.Node) bool {
|
||||
func IsMasterNode(nodeName string) bool {
|
||||
r := regexp.MustCompile("master(-...)?$")
|
||||
return r.MatchString(node.Name)
|
||||
return r.MatchString(nodeName)
|
||||
}
|
||||
|
Reference in New Issue
Block a user