mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Merge pull request #5257 from deads2k/deads-eliminate-wait-for-no-nodes
eliminate wait with no nodes
This commit is contained in:
commit
97e12957e6
@ -141,6 +141,10 @@ func (s *NodeController) Run(period time.Duration, syncNodeList, syncNodeStatus
|
||||
|
||||
// RegisterNodes registers the given list of nodes, it keeps retrying for `retryCount` times.
|
||||
func (s *NodeController) RegisterNodes(nodes *api.NodeList, retryCount int, retryInterval time.Duration) error {
|
||||
if len(nodes.Items) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
registered := util.NewStringSet()
|
||||
nodes = s.canonicalizeName(nodes)
|
||||
for i := 0; i < retryCount; i++ {
|
||||
|
Loading…
Reference in New Issue
Block a user