-
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
Identify minikube cluster for any profile name #4701
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4701 +/- ##
==========================================
- Coverage 73.42% 73.39% -0.03%
==========================================
Files 343 344 +1
Lines 13560 13669 +109
==========================================
+ Hits 9957 10033 +76
- Misses 2980 3002 +22
- Partials 623 634 +11
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.
Please create follow issue to deprecate --minikube-profile
#3668
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.
few nit changes to simply the code
Hopefully addressed all of them. |
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.
Querying the API server is just too expensive — we have some users developing against a cluster on the other side of the world. I thought @tstromberg's suggestion was to load up the kubeconfig files and look at the corresponding cluster's certificate-authority
to see if it was in ~/.minikube:
certificate-authority: /Users/bdealwis/.minikube/ca.crt
@briandealwis, I implemented this approach and removed the label checker. Although the label checker was a very deterministic check and we could have cached the result to not have to run it multiple times. Maybe we can revisit if current set of heuristics don't prove sufficient. |
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.
one nit.
And follow up with a PR for parsing error codes.
Co-authored-by: Tejal Desai <tejal29@gmail.com>
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.
A I noticed a few issues that should be fixed.
Fixed them in follow up PR #4742 |
Fixes #3668
Description
Currently we need to explicitly specify the minikube profile name as a skaffold flag or limit it to only 'minikube'. This PR introduces several checks for detecting a minikube cluster so that the flag will no longer be required and we can name the cluster anything.
We check:
The k8s nodes have a minikube label (refer label minikube nodes kubernetes/minikube#6717), or~/.minikube
directory (refer this comment), orminikube profile list
returns a config name matching the context, and