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

show status in profile list #5988

Merged
merged 1 commit into from
Dec 9, 2019
Merged

Conversation

medyagh
Copy link
Member

@medyagh medyagh commented Nov 27, 2019

This PR adds a new feature to see the status of a minikube profile (cluster) in the profile list command.

before this PR:

 $ ./out/minikube profile list
|---------|-----------|----------------|-----------|--------------------|
| Profile | VM Driver |     NodeIP     | Node Port | Kubernetes Version |
|---------|-----------|----------------|-----------|--------------------|
| p1      | hyperkit  | 192.168.64.165 |      8443 | v1.17.0-rc.1       |
|---------|-----------|----------------|-----------|--------------------|

after this PR:

$ make out/minikube && ./out/minikube profile list -o=table

|---------|-----------|----------------|-----------|--------------------|---------|
| Profile | VM Driver |     NodeIP     | Node Port | Kubernetes Version | Status  |
|---------|-----------|----------------|-----------|--------------------|---------|
| p1      | hyperkit  | 192.168.64.168 |      8443 | v1.17.0-rc.1       | Running |
| p2      | hyperkit  | 192.168.64.169 |      8443 | v1.17.0-rc.1       | Stopped |
|---------|-----------|----------------|-----------|--------------------|---------|

and also it added a status field to the json output

$ ./out/minikube profile list -o=json
{"invalid":[],"valid":[{"Name":"p1","Status":"Running","Config":[{"Name":"p1","KeepContext":false,"EmbedCerts":false,"MinikubeISO":"https://storage.googleapis.com/minikube/iso/minikube-v1.6.0-beta.1.iso","Memory":2000,"CPUs":2,"DiskSize":20000,"VMDriver":"hyperkit","ContainerRuntime":"docker","HyperkitVpnKitSock":"","HyperkitVSockPorts":[],"DockerEnv":null,"InsecureRegistry":null,"RegistryMirror":null,"HostOnlyCIDR":"192.168.99.1/24","HypervVirtualSwitch":"","KVMNetwork":"default","KVMQemuURI":"qemu:///system","KVMGPU":false,"KVMHidden":false,"DockerOpt":null,"DisableDriverMounts":false,"NFSShare":[],"NFSSharesRoot":"/nfsshares","UUID":"","NoVTXCheck":false,"DNSProxy":false,"HostDNSResolver":true,"KubernetesConfig":{"KubernetesVersion":"v1.17.0-rc.1","NodeIP":"192.168.64.168","NodePort":8443,"NodeName":"minikube","APIServerName":"minikubeCA","APIServerNames":null,"APIServerIPs":null,"DNSDomain":"cluster.local","ContainerRuntime":"docker","CRISocket":"","NetworkPlugin":"","FeatureGates":"","ServiceCIDR":"10.96.0.0/12","ImageRepository":"","ExtraOptions":null,"ShouldLoadCachedImages":true,"EnableDefaultCNI":false},"HostOnlyNicType":"virtio","NatNicType":"virtio"}]},{"Name":"p2","Status":"Running","Config":[{"Name":"p2","KeepContext":false,"EmbedCerts":false,"MinikubeISO":"https://storage.googleapis.com/minikube/iso/minikube-v1.6.0-beta.1.iso","Memory":2000,"CPUs":2,"DiskSize":20000,"VMDriver":"hyperkit","ContainerRuntime":"docker","HyperkitVpnKitSock":"","HyperkitVSockPorts":[],"DockerEnv":null,"InsecureRegistry":null,"RegistryMirror":null,"HostOnlyCIDR":"192.168.99.1/24","HypervVirtualSwitch":"","KVMNetwork":"default","KVMQemuURI":"qemu:///system","KVMGPU":false,"KVMHidden":false,"DockerOpt":null,"DisableDriverMounts":false,"NFSShare":[],"NFSSharesRoot":"/nfsshares","UUID":"","NoVTXCheck":false,"DNSProxy":false,"HostDNSResolver":true,"KubernetesConfig":{"KubernetesVersion":"v1.17.0-rc.1","NodeIP":"192.168.64.169","NodePort":8443,"NodeName":"minikube","APIServerName":"minikubeCA","APIServerNames":null,"APIServerIPs":null,"DNSDomain":"cluster.local","ContainerRuntime":"docker","CRISocket":"","NetworkPlugin":"","FeatureGates":"","ServiceCIDR":"10.96.0.0/12","ImageRepository":"","ExtraOptions":null,"ShouldLoadCachedImages":true,"EnableDefaultCNI":false},"HostOnlyNicType":"virtio","NatNicType":"virtio"}]}]}

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Nov 27, 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 Nov 27, 2019
@medyagh medyagh changed the title add status to profile list show status in profile list Nov 27, 2019
@codecov-io
Copy link

Codecov Report

Merging #5988 into master will decrease coverage by 0.07%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5988      +/-   ##
==========================================
- Coverage   36.18%   36.11%   -0.08%     
==========================================
  Files         110      110              
  Lines        8214     8230      +16     
==========================================
  Hits         2972     2972              
- Misses       4851     4867      +16     
  Partials      391      391
Impacted Files Coverage Δ
cmd/minikube/cmd/config/profile_list.go 4.1% <0%> (-1.16%) ⬇️

@medyagh
Copy link
Member Author

medyagh commented Dec 4, 2019

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Dec 4, 2019
@minikube-bot
Copy link
Collaborator

Error: running mkcmp: exit status 1

@tstromberg tstromberg merged commit 45c945f into kubernetes:master Dec 9, 2019
@medyagh medyagh deleted the profile_status branch May 2, 2020 22:32
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants