-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve kops get instances when api is unavailable #9938
Improve kops get instances when api is unavailable #9938
Conversation
/cc @hakman |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM only have 1 nit.
cmd/kops/get_instances.go
Outdated
nodeList, err := k8sClient.CoreV1().Nodes().List(ctx, metav1.ListOptions{}) | ||
if err != nil { | ||
klog.V(2).Infof("error listing nodes: %v", err) | ||
klog.Warningf("error listing nodes. Cannot determine node status: %v", err) | ||
emptyNodeName = "APIUnavailable" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Should we make this a bit more clear that it's the k8s API that is unavailable since we normally deal with both the k8s api and cloud provider API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any suggestion on the wording? don't think we can make the node name more verbose at least.
Maybe it makes more sense for the NODE-NAME column to use an empty string or |
a68f498
to
1c6093b
Compare
When the api is unavailable, kops will say all the nodes have not yet joined the cluster. That is not the case simply because e.g the admin credentials have been expired. This PR makes it a bit more clear that we cannot know the node name when the API is unavailable.
1c6093b
to
31ee079
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman, olemarkus The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
When the api is unavailable, kops will say all the nodes have not yet joined the cluster. That is not the case simply because e.g the admin credentials have been expired. This PR makes it a bit more clear that we cannot know the node name when the API is unavailable.