Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/k8sclient/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package k8sclient

import (
"context"
"fmt"
"time"

v1 "k8s.io/api/core/v1"
Expand All @@ -13,6 +14,9 @@ import (
)

func GetNodeWithRetry(ctx context.Context, nodeName string) (*v1.Node, error) {
if nodeName == "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this cause log spamming in the issue's case? Because they will not be specifying nodeName, and we will log the error. Can you confirm that the error will only get log once, and will not spam the logging?

return nil, fmt.Errorf("node name is empty")
}
cfg, err := rest.InClusterConfig()
if err != nil {
return nil, err
Expand Down