Updating minikube profile list cmd table representation
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.pull/17735/head
parent
8990648956
commit
92ccbd1049
|
@ -190,7 +190,7 @@ func profileStatus(p *config.Profile, api libmachine.API) string {
|
|||
|
||||
func renderProfilesTable(ps [][]string) {
|
||||
table := tablewriter.NewWriter(os.Stdout)
|
||||
table.SetHeader([]string{"Profile", "VM Driver", "Runtime", "IP", "Port", "Version", "Status", "Nodes", "Active Kubecontext"})
|
||||
table.SetHeader([]string{"Profile", "VM Driver", "Runtime", "IP", "Port", "Version", "Status", "Nodes", "Active Profile", "Active Kubecontext"})
|
||||
table.SetAutoFormatHeaders(false)
|
||||
table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true})
|
||||
table.SetCenterSeparator("|")
|
||||
|
|
|
@ -27,8 +27,8 @@ import (
|
|||
"github.com/spf13/viper"
|
||||
"k8s.io/klog/v2"
|
||||
"k8s.io/minikube/pkg/drivers/kic/oci"
|
||||
"k8s.io/minikube/pkg/minikube/localpath"
|
||||
"k8s.io/minikube/pkg/minikube/kubeconfig"
|
||||
"k8s.io/minikube/pkg/minikube/localpath"
|
||||
"k8s.io/minikube/pkg/util/lock"
|
||||
)
|
||||
|
||||
|
|
|
@ -25,10 +25,10 @@ import (
|
|||
|
||||
// Profile represents a minikube profile
|
||||
type Profile struct {
|
||||
Name string
|
||||
Status string // running, stopped, paused, unknown
|
||||
Config *ClusterConfig
|
||||
Active bool
|
||||
Name string
|
||||
Status string // running, stopped, paused, unknown
|
||||
Config *ClusterConfig
|
||||
Active bool
|
||||
ActiveKubeContext bool
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue