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

Added a new command: profile list #4811

Merged
merged 12 commits into from
Jul 19, 2019

Conversation

medyagh
Copy link
Member

@medyagh medyagh commented Jul 18, 2019

This PR add a new command to minikube, profile list that looks like this

 profile list
|---------|------------|----------------|-----------|--------------------|
| Profile | VM Driver  |     NodeIP     | Node Port | Kubernetes Version |
|---------|------------|----------------|-----------|--------------------|
| m1      | hyperkit   | 192.168.64.75  |      8443 | v1.15.0            |
| m4      | virtualbox | 192.168.99.136 |      8443 | v1.15.0            |
|---------|------------|----------------|-----------|--------------------|

if there be invalid profiles it will warn this way:

medya@minikube$ ./out/minikube profile list
|---------|------------|----------------|-----------|--------------------|
| Profile | VM Driver  |     NodeIP     | Node Port | Kubernetes Version |
|---------|------------|----------------|-----------|--------------------|
| p1      | hyperkit   | 192.168.64.75  |      8443 | v1.15.0            |
| p2      | virtualbox | 192.168.99.136 |      8443 | v1.15.0            |
|---------|------------|----------------|-----------|--------------------|
⚠️  Found 3 invalid profile(s) ! 
         p3_empty
         p4_invalid_file
         p5_partial_config
💡  You can delete them using the following command(s): 
         $ minikube delete -p p3_empty 
         $ minikube delete -p p4_invalid_file 
         $ minikube delete -p p5_partial_config 

it will also print an err to the logs, if there is a not valid config profile (empty dir)

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 18, 2019
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jul 18, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 18, 2019
@sharifelgamal
Copy link
Collaborator

Could you add a unit test of profile.go? Just a basic one that makes sure you can find all the profiles in a given directory?

Copy link
Contributor

@tstromberg tstromberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Minor nits.

cmd/minikube/cmd/config/profile_list.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/config/profile_list.go Show resolved Hide resolved
cmd/minikube/cmd/config/profile_list.go Outdated Show resolved Hide resolved
pkg/minikube/config/profile.go Outdated Show resolved Hide resolved
pkg/minikube/config/profile.go Outdated Show resolved Hide resolved
pkg/minikube/config/profile.go Outdated Show resolved Hide resolved
pkg/minikube/config/profile.go Outdated Show resolved Hide resolved
pkg/minikube/config/profile.go Outdated Show resolved Hide resolved
cmd/minikube/cmd/config/profile_list.go Show resolved Hide resolved
pkg/minikube/config/profile.go Outdated Show resolved Hide resolved
@medyagh
Copy link
Member Author

medyagh commented Jul 19, 2019

/retest this please

@sharifelgamal
Copy link
Collaborator

The test failure looks to be the unrelated registry failure we've been seeing. LGTM.

@medyagh medyagh merged commit 9f42df6 into kubernetes:master Jul 19, 2019
@medyagh medyagh deleted the add_profile_list_cmd branch July 19, 2019 22:43
@medyagh medyagh changed the title Add a new command (profile list) Add a new command: profile list Jul 19, 2019
@medyagh medyagh changed the title Add a new command: profile list Added a new command: profile list Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants