-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Adding the active kubecontext to minikube profile list command #17735
Conversation
Hi @Skalador. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Can one of the admins verify this patch? |
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.
this PR would make it more clear thank you for quick contribution, lets do the changes in the comment
@@ -154,7 +154,7 @@ func profileStatus(p *config.Profile, api libmachine.API) string { | |||
|
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.
Thank you for this PR, I think for sake of more clarity what active minikube profile is, in addition to "ActiveKubeContext" Column
we should have "Active miniikube" column,
by the way one idea for a follow up PR,
we could Later get rid of some of the column by default such as "Port" or K8S version, and make it available only in a --detailed or --long format
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.
Hi, thanks for your fast answer!
Do I understand you correctly, that you want the table output to change from:
minikube profile list -o table
|-----------|-----------|---------|--------------|------|---------|---------|-------|--------------------|
| Profile | VM Driver | Runtime | IP | Port | Version | Status | Nodes | Active Kubecontext |
|-----------|-----------|---------|--------------|------|---------|---------|-------|--------------------|
| *minikube | docker | docker | 192.168.49.2 | 8443 | v1.28.4 | Running | 1 | |
| minikube2 | docker | docker | 192.168.58.2 | 8443 | v1.28.4 | Running | 1 | * |
|-----------|-----------|---------|--------------|------|---------|---------|-------|--------------------|
to
minikube profile list -o table
|-----------|-----------|---------|--------------|------|---------|---------|-------|--------------------|-------------------|
| Profile | VM Driver | Runtime | IP | Port | Version | Status | Nodes | Active Profile | Active Kubecontext|
|-----------|-----------|---------|--------------|------|---------|---------|-------|--------------------|-------------------|
| minikube | docker | docker | 192.168.49.2 | 8443 | v1.28.4 | Running | 1 | * | |
| minikube2 | docker | docker | 192.168.58.2 | 8443 | v1.28.4 | Running | 1 | | * |
|-----------|-----------|---------|--------------|------|---------|---------|-------|--------------------|-------------------|
The JSON output shall be the same due to compatibility reasons, correct?
When this PR is merged, I can create an issue (or PR) addressing the follow up issue.
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.
Hi @medyagh, I have updated this PR with my above comment.
minikube profile list -o table
|-----------|-----------|---------|--------------|------|---------|---------|-------|----------------|--------------------|
| Profile | VM Driver | Runtime | IP | Port | Version | Status | Nodes | Active Profile | Active Kubecontext |
|-----------|-----------|---------|--------------|------|---------|---------|-------|----------------|--------------------|
| minikube | docker | docker | 192.168.49.2 | 8443 | v1.28.4 | Running | 1 | * | |
| minikube2 | docker | docker | 192.168.58.2 | 8443 | v1.28.4 | Running | 1 | | * |
|-----------|-----------|---------|--------------|------|---------|---------|-------|----------------|--------------------|
The JSON output is the same as before due to compatibility reasons. I thought about adding ActiveProfile
, which has the same data as Active
with a deprecation note. The deprecation note shall point out, that Active
will be removed in a future release and ActiveProfile
shall be used instead.
minikube profile list -o json | jq | grep -i active
"Active": true,
"ActiveKubeContext": false
"Active": false,
"ActiveKubeContext": true
Please let me know, what you think.
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.
You have formatting issues, can you run gofmt -w -s .
and then upload the changes
Hi @spowelljr, thanks for pointing this out. I have fixed it alongside the request from @medyagh . |
@Skalador could you please resolve the merge conflicts |
The minikube profile list does not show the active kubecontext. The active kubecontext was added to the profiles as ActiveKubeContext similar to the Active property of the existing implementation. This allows older version, which rely on the json field Active, to still work and additionally obtain the information about ActiveKubeContext. The table representation for the minikube profile list command was updated as well. Active minikube profiles are highlighted in the Profile column. The Active column was replaced with an Active Kubecontext column.
Updated the command line output of minikube profile list -o table to have two columns, i.e. Active Profile and Active Kubecontext. This makes the output more intuitive. Formatting issues are fixed as well.
b4191e4
to
92ccbd1
Compare
/ok-to-test |
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.
thank you for this PR and addressing the review comments
as a follow up PR we could rename VM driver to driver |
kvm2 driver with docker runtime
Times for minikube start: 51.5s 56.0s 48.8s 51.7s 53.2s Times for minikube ingress: 26.6s 28.1s 23.0s 27.0s 23.5s docker driver with docker runtime
Times for minikube start: 22.0s 24.9s 21.4s 21.9s 24.8s Times for minikube ingress: 22.3s 20.8s 21.3s 21.3s 20.8s docker driver with containerd runtime
Times for minikube ingress: 31.8s 31.8s 31.8s 30.8s 31.8s Times for minikube start: 20.0s 23.5s 22.8s 20.1s 22.5s |
These are the flake rates of all failed tests.
To see the flake rates of all tests by environment, click here. |
@Skalador could you please resolve these failed test cases? |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: medyagh, Skalador, spowelljr 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 |
The
minikube profile list
does not show the active kubecontext as pointed out in #16604. The active kubecontext was added to the profiles asActiveKubeContext
similar to theActive
property of the existing implementation. This allows older version, which rely on the json fieldActive
, to still work and additionally obtain the information aboutActiveKubeContext
. The table representation for the minikube profile list command was updated as well. Active minikube profiles are highlighted in theProfile
column. The Active column was replaced with an Active Kubecontext column.Table representation before PR:
Table representation after PR:
JSON representation before PR:
JSON representation after PR: