Skip to content

Commit

Permalink
Merge pull request #9702 from daehyeok/print_node
Browse files Browse the repository at this point in the history
Add number of nodes for cluster in `minikube profile list`
  • Loading branch information
medyagh authored Nov 24, 2020
2 parents 64bfa15 + 97db8b5 commit 02511f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/minikube/cmd/config/profile_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,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"})
table.SetHeader([]string{"Profile", "VM Driver", "Runtime", "IP", "Port", "Version", "Status", "Nodes"})
table.SetAutoFormatHeaders(false)
table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true})
table.SetCenterSeparator("|")
Expand All @@ -146,7 +146,7 @@ func profilesToTableData(profiles []*config.Profile) [][]string {
exit.Error(reason.GuestCpConfig, "error getting primary control plane", err)
}

data = append(data, []string{p.Name, p.Config.Driver, p.Config.KubernetesConfig.ContainerRuntime, cp.IP, strconv.Itoa(cp.Port), p.Config.KubernetesConfig.KubernetesVersion, p.Status})
data = append(data, []string{p.Name, p.Config.Driver, p.Config.KubernetesConfig.ContainerRuntime, cp.IP, strconv.Itoa(cp.Port), p.Config.KubernetesConfig.KubernetesVersion, p.Status, strconv.Itoa(len(p.Config.Nodes))})
}
return data
}
Expand Down

0 comments on commit 02511f1

Please sign in to comment.