mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 01:40:07 +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.
|
// 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 {
|
func (s *NodeController) RegisterNodes(nodes *api.NodeList, retryCount int, retryInterval time.Duration) error {
|
||||||
|
if len(nodes.Items) == 0 {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
registered := util.NewStringSet()
|
registered := util.NewStringSet()
|
||||||
nodes = s.canonicalizeName(nodes)
|
nodes = s.canonicalizeName(nodes)
|
||||||
for i := 0; i < retryCount; i++ {
|
for i := 0; i < retryCount; i++ {
|
||||||
|
Loading…
Reference in New Issue
Block a user