-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Minikube cluster detection followup #4742
Minikube cluster detection followup #4742
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4742 +/- ##
==========================================
+ Coverage 73.42% 73.44% +0.01%
==========================================
Files 345 345
Lines 13755 13739 -16
==========================================
- Hits 10100 10090 -10
+ Misses 3022 3020 -2
+ Partials 633 629 -4
Continue to review full report at Codecov.
|
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.
I think we should still do the minikube profile name
heuristic — there's an easy workaround to avoid it (rename the context) or use the global config to explicitly override the local-cluster.
for _, n := range v.Config.Nodes { | ||
if serverURL.Host == fmt.Sprintf("%s:%d", n.IP, n.Port) { | ||
if err == nil && serverURL.Host == fmt.Sprintf("%s:%d", n.IP, n.Port) { | ||
// TODO: Revisit once https://github.com/kubernetes/minikube/issues/6642 is fixed | ||
return true, nil | ||
} | ||
} |
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.
I think we still want the profileId == kubeContext heuristic:
if v.Config.Name != kubeContext {
logrus.Infof("Found minikube profile with same name as %q", kubeContext)
return true, nil
}
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.
but by your own example: having GKE, kind and minikube clusters all called test, this heuristic would fail. Even though there's a workaround for that, it could break folks on release and as such doesn't seem that backwards compatible. Maybe it'd be better if minikube fixed kubernetes/minikube#6642 so we wouldn't have to go around guessing.
Fixes for comments on #4701 after it got merged