Skip to content
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

Merged

Conversation

gsquared94
Copy link
Contributor

Fixes for comments on #4701 after it got merged

pkg/skaffold/cluster/minikube.go Outdated Show resolved Hide resolved
pkg/skaffold/cluster/minikube.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 1, 2020

Codecov Report

Merging #4742 into master will increase coverage by 0.01%.
The diff coverage is 80.00%.

Impacted file tree graph

@@            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     
Impacted Files Coverage Δ
pkg/skaffold/cluster/minikube.go 70.31% <80.00%> (+1.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 374326b...db79c42. Read the comment docs.

Copy link
Member

@briandealwis briandealwis left a 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
}
}
Copy link
Member

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
 		}

Copy link
Contributor Author

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.

pkg/skaffold/cluster/minikube.go Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants