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

enable skaffold to work on minikube profiles #3668

Closed
balopat opened this issue Feb 7, 2020 · 8 comments · Fixed by #4701
Closed

enable skaffold to work on minikube profiles #3668

balopat opened this issue Feb 7, 2020 · 8 comments · Fixed by #4701

Comments

@balopat
Copy link
Contributor

balopat commented Feb 7, 2020

Currently, if kube-context is pointing to a minikube profile that is not minikube, bunch of things will fail:

  • we don't detect that this is a minikube profile
  • even if we would, we'd call minikube docker-env without profile

My recommendation would be:

  • decide if the api-server URL is local or not (192.168.0.0/16, 172.0.0.0/24)
  • if not local, assume remote
  • if local - check if minikube exists as a binary in the path, if yes: minikube profile list and see if any of them match the IP address - if yes, use the profile name for that profile throughout the code
@nkubala
Copy link
Contributor

nkubala commented Feb 13, 2020

surprised we didn't run into this one sooner. where did you get 172.0.0.0 from (just curious)? isn't is possible that someone could have proxied their apiserver locally, and we would fail by assuming it's local when it actually isn't?

in general though this is an improvement on what we're doing now.

@balopat
Copy link
Contributor Author

balopat commented Feb 13, 2020

surprised we didn't run into this one sooner.

I know...maybe I'm missing something?

where did you get 172.0.0.0 from (just curious)?

minikube docker driver ;)

@balopat balopat added priority/p0 Highest priority. We are actively looking at delivering it. and removed priority/p1 High impact feature/bug. labels Feb 14, 2020
@balopat balopat self-assigned this Feb 14, 2020
@briandealwis
Copy link
Member

Would it make sense to look at the corresponding machines interfaces?

@balopat
Copy link
Contributor Author

balopat commented Feb 20, 2020

Would it make sense to look at the corresponding machines interfaces?

minikube profile list should be good enough to list the necessary details. What do you mean by machine interfaces?

@balopat
Copy link
Contributor Author

balopat commented Feb 20, 2020

kubernetes/minikube#6715 is also going to be useful going forward, however, we'll need to implement ApiServer endpoint matching for older minikube versions IMO.

@briandealwis
Copy link
Member

I meant host's network interfaces, thinking that we could correlate the API server to the available network interfaces to identify whether it's local on the machine.

minikube profile list sounds much easier.

@balopat balopat added priority/p1 High impact feature/bug. and removed priority/p0 Highest priority. We are actively looking at delivering it. labels Feb 22, 2020
@balopat
Copy link
Contributor Author

balopat commented Feb 22, 2020

bumping down to p1 since --minikube-profile flag was released...

@tstromberg tstromberg added priority/p2 May take a couple of releases and removed priority/p1 High impact feature/bug. labels Apr 30, 2020
@tstromberg
Copy link
Contributor

If it helps, minikube profile list -o json is there.

One additional hint I've seen used in the past is looking for minikube in the certificate authority path.

@balopat balopat added the fixit label May 7, 2020
@dgageot dgageot removed the area/cache label Jul 1, 2020
@tstromberg tstromberg added priority/p1 High impact feature/bug. and removed priority/p2 May take a couple of releases labels Aug 13, 2020
@nkubala nkubala added this to the v1.14.0-friction milestone Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants