Repository navigation
Add spinner at preparing Kubernetes... - #985 10000 5
Conversation
There was a problem hiding this comment.
I dont know think we need to pass true or false to out.String
I think we only need it in out.Step (is there a reason we pass it to out.String ?
also consider using a Constant in the out package for a better code readability
for example
out.Step(style.Tip, false, "kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A'")
can be chaged to
out.Step(style.Tip, out.Spinning, "kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A'")
and for false it would
out.Step(style.Tip, out.NoSpinner, "kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A'")
| out.ErrT(style.Notice, "Multiple minikube profiles were found - ") | ||
| for _, p := range profilesToDelete { | ||
| out.Step(style.Notice, " - {{.profile}}", out.V{"profile": p.Name}) | ||
| out.Step(style.Notice, out.NoSpinner, " - {{.profile}}", out.V{"profile": p.Name}) |
There was a problem hiding this comment.
lets move out.NoSpinner to style.NoSpinner
There was a problem hiding this comment.
Rather than adding an extra argument: the styles are designed to carry all information necessary for display. I would suggest adding a Spin bool to style.Options:
minikube/pkg/minikube/style/style.go
Line 37 in ead11c6
There was a problem hiding this comment.
Great idea! thanks @tstromberg from 42 files we reduce it to 6
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alonyb, medyagh The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/ok-to-test |
|
kvm2 Driver Times for Minikube (PR 9855): 29.7s 29.2s 28.2s Averages Time Per Log Details |
|
kvm2 Driver Times for Minikube (PR 9855): 29.7s 28.8s 29.4s Averages Time Per Log Details |
This PR is to #9091
Spinner was added in step:
This spinner works with this repo(module) forked in alonyb/spinner
PR of original repo is here
With this user feels more comfortable UI
In Windows was testing too and it works without problem
Next step:
Add spinner in another processes as (
Starting Control plane ...andpulling docker image...and others.)minikube start --output=jsonoutput:
{"data":{"currentstep":"0","message":"minikube v1.15.1 on Darwin 10.15.7","name":"Initial Minikube Setup","totalsteps":"12"},"datacontenttype":"application/json","id":"7e20202a-babe-48e1-910d-6b525e8e7ef2","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"} {"data":{"currentstep":"1","message":"Automatically selected the docker driver","name":"Selecting Driver","totalsteps":"12"},"datacontenttype":"application/json","id":"ba60dba1-7394-4a9b-88f4-9929f3f07580","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"} {"data":{"currentstep":"3","message":"Starting control plane node minikube in cluster minikube","name":"Starting Node","totalsteps":"12"},"datacontenttype":"application/json","id":"bfb2efda-bf26-4e47-b745-1b0a3366e13e","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"} {"data":{"currentstep":"6","message":"Creating docker container (CPUs=2, Memory=1990MB) ...","name":"Creating Container","totalsteps":"12"},"datacontenttype":"application/json","id":"b3017c52-e565-49d5-850a-f038bef8d3f5","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"} {"data":{"currentstep":"8","message":"Preparing Kubernetes v1.19.4 on Docker 19.03.13 ...","name":"Preparing Kubernetes","totalsteps":"12"},"datacontenttype":"application/json","id":"108d626e-6a0a-4ce3-8521-f52d9cacd6af","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"} {"data":{"currentstep":"10","message":"Verifying Kubernetes components...","name":"Verifying Kubernetes","totalsteps":"12"},"datacontenttype":"application/json","id":"63cded8a-fe6b-44d8-87b2-ba9aa1d82d4d","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"} {"data":{"currentstep":"11","message":"Enabled addons: default-storageclass, storage-provisioner","name":"Enabling Addons","totalsteps":"12"},"datacontenttype":"application/json","id":"65a9f4d7-9866-417a-a7c4-d5e9cdecfdeb","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"} {"data":{"message":"/usr/local/bin/kubectl is version 1.16.6-beta.0, which may have incompatibilites with Kubernetes 1.19.4."},"datacontenttype":"application/json","id":"11e64450-c0d2-4884-b210-12dcd2bc3e50","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.warning"} {"data":{"message":"Want kubectl v1.19.4? Try 'minikube kubectl -- get pods -A'"},"datacontenttype":"application/json","id":"df0d59f2-983e-4392-8529-16343e895300","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.info"} {"data":{"currentstep":"12","message":"Done! kubectl is now configured to use \"minikube\" cluster and \"default\" namespace by default","name":"Done","totalsteps":"12"},"datacontenttype":"application/json","id":"4cc4a768-206b-48fd-8ccb-d355059508f3","source":"https://minikube.sigs.k8s.io/","specversion":"1.0","type":"io.k8s.sigs.minikube.step"}