Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
1142085
Update releases.json & releases-v2.json to include v1.36.0 (#20824)
minikube-bot May 22, 2025
1df6e76
Add leaderboard for v1.36.0 (#20823)
minikube-bot May 23, 2025
f89d46d
add time-to-k8s benchmark for v1.36.0 (#20825)
minikube-bot May 23, 2025
3cf1e63
build: address all lint issues by v2 (#20804)
LJTian May 24, 2025
c306a0f
docs: Fix instructions for building iso (#20830)
nirs May 27, 2025
0dfd71a
Build(deps): Bump k8s.io/component-base from 0.32.2 to 0.33.1 (#20846)
dependabot[bot] May 27, 2025
7138f2b
Build(deps): Bump google.golang.org/api from 0.233.0 to 0.234.0 (#20850)
dependabot[bot] May 27, 2025
759214f
Build(deps): Bump go.opentelemetry.io/otel/trace from 1.35.0 to 1.36.…
dependabot[bot] May 28, 2025
85a9ffb
CI: Update gh from 2.72.0 to 2.73.0 (#20839)
minikube-bot May 28, 2025
a340e3e
Site: Update hugo from v0.147.2 to v0.147.5 (#20840)
minikube-bot May 28, 2025
f439f0c
add short hand -m for --memory (#20854)
medyagh May 29, 2025
97cc0ca
Update auto-generated docs and translations (#20861)
minikube-bot May 30, 2025
64552ba
site: Update docsy version to v0.12.0 (#20875)
minikube-bot Jun 2, 2025
5d2e311
Addon Volcano: Update volcano images from v1.11.2 to v1.12.1 (#20868)
minikube-bot Jun 2, 2025
0e12a7d
Update yearly leaderboard (#20864)
minikube-bot Jun 2, 2025
b12050d
Addon inspektor-gadget: Update inspektor-gadget image from v0.40.0 to…
minikube-bot Jun 3, 2025
9f50bdf
Site: Update hugo from v0.147.5 to v0.147.7 (#20869)
minikube-bot Jun 3, 2025
2ca8686
CNI: Update calico from v3.30.0 to v3.30.1 (#20871)
minikube-bot Jun 3, 2025
4da3ced
Fix KVM driver (tests) timeouts (#20852)
prezha Jun 3, 2025
4bca65a
CI: Update gh from 2.73.0 to 2.74.0 (#20867)
minikube-bot Jun 3, 2025
945b436
don't call startKicServiceTunnel for non-kic drivers (#20863)
prezha Jun 4, 2025
60212f1
new: add kubetail addon (#20345)
amorey Jun 5, 2025
da0839e
iso: Fix console for vfkit/krunkit (#20832)
nirs Jun 5, 2025
c292f1d
Update libvirt-dev version to 8.0.0-1ubuntu7.11 (#20889)
LJTian Jun 6, 2025
10fb3bb
qemu: Add serial log (#20894)
nirs Jun 6, 2025
25f76c4
Build(deps): Bump k8s.io/kubectl from 0.32.2 to 0.33.1 (#20847)
dependabot[bot] Jun 6, 2025
017ef75
redo "minikube profile list" to move the verbose details into a --det…
LJTian Jun 6, 2025
57dd4b3
iso: Disable grub timeout speeding up vm start by 5 seconds (#20895)
nirs Jun 6, 2025
a61c304
Update auto-generated docs and translations (#20897)
minikube-bot Jun 6, 2025
f903a5c
Site: Update hugo from v0.147.7 to v0.147.8 (#20912)
minikube-bot Jun 9, 2025
9328978
Addon ingress: Update ingress-nginx/controller image from v1.12.2 to …
minikube-bot Jun 10, 2025
0cf4a80
Addon kubevirt: Update bitnami/kubectl image from 1.33.1 to 1.33.1 (#…
minikube-bot Jun 10, 2025
1cdd1e2
CNI: Update flannel from v0.26.7 to v0.27.0 (#20907)
minikube-bot Jun 10, 2025
b66888d
vfkit: Use EFI booloader (#20833)
nirs Jun 10, 2025
1c9097f
fix: YAML file escape error problem (#20904)
LJTian Jun 11, 2025
eaa7f46
Addon kong: Update kong/kubernetes-ingress-controller image from 3.4.…
minikube-bot Jun 12, 2025
c967cf7
Build(deps): Bump github.com/docker/cli (#20918)
dependabot[bot] Jun 12, 2025
bcb2c8c
Fix french translation (#20945)
jeffmaury Jun 17, 2025
16ff3bf
CI: Update gh from 2.74.0 to 2.74.1 (#20937)
minikube-bot Jun 17, 2025
bea459a
Addon kubevirt: Update bitnami/kubectl image from 1.33.1 to 1.33.1 (#…
minikube-bot Jun 17, 2025
2da2207
site: Update node from 20.19.2 to 20.19.3 (#20974)
minikube-bot Jun 23, 2025
4bea142
CI: Update gotestsum from v1.12.2 to v1.12.3 (#20975)
minikube-bot Jun 23, 2025
dbebd87
CI: Update gh from 2.74.1 to 2.74.2 (#20967)
minikube-bot Jun 23, 2025
54b8312
Fix french translation (#20964)
jeffmaury Jun 23, 2025
989a077
CNI: Update calico from v3.30.1 to v3.30.2 (#20971)
minikube-bot Jun 23, 2025
db95e21
update image constants for kubeadm images (#20960)
minikube-bot Jun 23, 2025
64e40c6
Addon cloud-spanner: Update cloud-spanner-emulator/emulator image fro…
minikube-bot Jun 23, 2025
157a99d
update Kubernetes versions list (#20961)
minikube-bot Jun 25, 2025
b3a45b3
bump default/newest kubernetes versions (#20963)
minikube-bot Jun 25, 2025
21d0a4d
docs: clarify --addons flag description (#20954)
ipochi Jun 25, 2025
12752de
docs: update mDNS reload instructions (#20955)
ipochi Jun 25, 2025
30d0c5f
Addon kong: Update kong/kubernetes-ingress-controller image from 3.4.…
minikube-bot Jun 25, 2025
24faef8
CNI: Update cilium from v1.17.4 to v1.17.5 (#20968)
minikube-bot Jun 25, 2025
c9f132f
Remove spowelljr from reviewers list
spowelljr Jun 26, 2025
bda4dfb
Merge pull request #20988 from kubernetes/spowelljr-patch-1
spowelljr Jun 26, 2025
28b0c9f
chore: fix some function names in comment (#20990)
gopherorg Jun 27, 2025
7a2dfb4
update Kubernetes versions list (#20997)
minikube-bot Jun 30, 2025
24d5c73
update image constants for kubeadm images (#20996)
minikube-bot Jun 30, 2025
4b06829
Update go-github from v72.0.0 to v73.0.0 (#21000)
minikube-bot Jun 30, 2025
804c01a
vmnet: Support offloading for krunkit (#20831)
nirs Jun 30, 2025
381b549
Build(deps-dev): Bump braces from 3.0.2 to 3.0.3 in /site
dependabot[bot] Jul 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 6 additions & 26 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,8 @@ linters:
- "-ST1020"
- "-ST1021"
- "-ST1022"
##### TODO: fix and enable these
# 4 occurrences.
# Use fmt.Fprintf(x, ...) instead of x.Write(fmt.Sprintf(...)) https://staticcheck.dev/docs/checks#QF1012
- "-QF1012"
# 3 occurrences.
# Apply De Morgan’s law https://staticcheck.dev/docs/checks#QF1001
- "-QF1001"
# 9 occurrences.
# Convert if/else-if chain to tagged switch https://staticcheck.dev/docs/checks#QF1003
- "-QF1003"
# 1 occurrence.
# could omit type *os.File from declaration; it will be inferred from the right-hand side
- "-QF1011"
##### These have been vetted to be disabled.
# 19 occurrences. Omit embedded fields from selector expression https://staticcheck.dev/docs/checks#QF1008
# Usefulness is questionable.
- "-QF1008"

revive:
enable-all-rules: true
rules:
Expand Down Expand Up @@ -150,23 +135,22 @@ linters:
# - yodaStyleExpr
# - typeUnparen

##### TODO: fix and enable these
# We enabled these and we pass
- nilValReturn
# - weakCond # pkg/minikube/config/profile.go:61:9: weakCond: suspicious `cc.Nodes != nil && cc.Nodes[0].Name == node.Name`; nil check may not be enough, check for len (gocritic)
- weakCond
- indexAlloc
- rangeExprCopy
- boolExprSimplify
- commentedOutImport
# - docStub # pkg/minikube/tunnel/kic/service_tunnel.go:51:1: docStub: silencing go lint doc-comment warnings is unadvised (gocritic)
- docStub
- emptyFallthrough
- hexLiteral
- typeAssertChain
- unlabelStmt
# - builtinShadow # cmd/minikube/cmd/delete.go:89:7: builtinShadow: shadowing of predeclared identifier: error (gocritic)
# - importShadow # pkg/storage/storage_provisioner.go:60:2: importShadow: shadow of imported package 'path' (gocritic)
- builtinShadow
- importShadow
- initClause
# - nestingReduce # pkg/minikube/tunnel/registry.go:94:3: nestingReduce: invert if cond, replace body with `continue`, move old body after the statement (gocritic)
- nestingReduce
- unnecessaryBlock

exclusions:
Expand All @@ -181,7 +165,3 @@ linters:
- path: '(.+)\.go$'
text: "Error return value of `.*` is not checked"
linter: errcheck
# This code is doubtful and I don't understand it. Location: Line 456
- path: 'cmd/minikube/cmd/docker-env.go'
text: "useless-break: useless break in case clause"
linter: revive
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ KIC_VERSION ?= $(shell grep -E "Version =" pkg/drivers/kic/types.go | cut -d \"
HUGO_VERSION ?= $(shell grep -E "HUGO_VERSION = \"" netlify.toml | cut -d \" -f2)

# Default to .0 for higher cache hit rates, as build increments typically don't require new ISO versions
ISO_VERSION ?= v1.36.0
ISO_VERSION ?= v1.36.0-1749153077-20895

# Dashes are valid in semver, but not Linux packaging. Use ~ to delimit alpha/beta
DEB_VERSION ?= $(subst -,~,$(RAW_VERSION))
Expand Down Expand Up @@ -103,7 +103,7 @@ $(shell mkdir -p $(BUILD_DIR))
CURRENT_GIT_BRANCH ?= $(shell git branch | grep \* | cut -d ' ' -f2)

# Use system python if it exists, otherwise use Docker.
PYTHON := $(shell command -v python || echo "docker run --rm -it -v $(shell pwd):/minikube:Z -w /minikube python python")
PYTHON := $(shell command -v python || echo "docker run --rm -it -v $(shell pwd):/minikube -w /minikube python python")
BUILD_OS := $(shell uname -s)

SHA512SUM=$(shell command -v sha512sum || echo "shasum -a 512")
Expand Down Expand Up @@ -189,7 +189,7 @@ endef

# $(call DOCKER, image, command)
define DOCKER
docker run --rm -e GOCACHE=/app/.cache -e IN_DOCKER=1 --user $(shell id -u):$(shell id -g) -w /app -v $(PWD):/app:Z -v $(GOPATH):/go --init $(1) /bin/bash -c '$(2)'
docker run --rm -e GOCACHE=/app/.cache -e IN_DOCKER=1 --user $(shell id -u):$(shell id -g) -w /app -v $(PWD):/app -v $(GOPATH):/go --init $(1) /bin/bash -c '$(2)'
endef

ifeq ($(BUILD_IN_DOCKER),y)
Expand Down Expand Up @@ -341,13 +341,13 @@ out/minikube-%.iso: $(shell find "deploy/iso/minikube-iso" -type f)
ifeq ($(IN_DOCKER),1)
$(MAKE) minikube-iso-$*
else
docker run --rm --workdir /mnt --volume $(CURDIR):/mnt:Z $(ISO_DOCKER_EXTRA_ARGS) \
docker run --rm --workdir /mnt --volume $(CURDIR):/mnt $(ISO_DOCKER_EXTRA_ARGS) \
--user $(shell id -u):$(shell id -g) --env HOME=/tmp --env IN_DOCKER=1 \
$(ISO_BUILD_IMAGE) /bin/bash -lc '/usr/bin/make minikube-iso-$*'
endif

iso_in_docker:
docker run -it --rm --workdir /mnt --volume $(CURDIR):/mnt:Z $(ISO_DOCKER_EXTRA_ARGS) \
docker run -it --rm --workdir /mnt --volume $(CURDIR):/mnt $(ISO_DOCKER_EXTRA_ARGS) \
--user $(shell id -u):$(shell id -g) --env HOME=/tmp --env IN_DOCKER=1 \
$(ISO_BUILD_IMAGE) /bin/bash

Expand Down Expand Up @@ -523,7 +523,7 @@ out/linters/golangci-lint-$(GOLINT_VERSION):
.PHONY: lint
ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y)
lint:
docker run --rm -v `pwd`:/app:Z -w /app golangci/golangci-lint:$(GOLINT_VERSION) \
docker run --rm -v `pwd`:/app -w /app golangci/golangci-lint:$(GOLINT_VERSION) \
golangci-lint run ${GOLINT_OPTIONS} ./..."
# --skip-dirs "cmd/drivers/kvm|cmd/drivers/hyperkit|pkg/drivers/kvm|pkg/drivers/hyperkit"
# The "--skip-dirs" parameter is no longer supported in the V2 version. If you need to skip the directory,
Expand Down Expand Up @@ -657,7 +657,7 @@ out/docker-machine-driver-hyperkit:
ifeq ($(MINIKUBE_BUILD_IN_DOCKER),y)
docker run --rm -e GOCACHE=/app/.cache -e IN_DOCKER=1 \
--user $(shell id -u):$(shell id -g) -w /app \
-v $(PWD):/app:Z -v $(GOPATH):/go:Z --init --entrypoint "" \
-v $(PWD):/app -v $(GOPATH):/go --init --entrypoint "" \
$(HYPERKIT_BUILD_IMAGE) /bin/bash -c 'CC=o64-clang CXX=o64-clang++ /usr/bin/make $@'
else
$(if $(quiet),@echo " GO $@")
Expand Down
1 change: 0 additions & 1 deletion OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
reviewers:
- medyagh
- prezha
- spowelljr
- comradeprogrammer
approvers:
- medyagh
Expand Down
12 changes: 6 additions & 6 deletions cmd/minikube/cmd/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func GenerateBashCompletion(w io.Writer, cmd *cobra.Command) error {
}

// GenerateZshCompletion generates the completion for the zsh shell
func GenerateZshCompletion(out io.Writer, cmd *cobra.Command) error {
func GenerateZshCompletion(w io.Writer, cmd *cobra.Command) error {
zshAutoloadTag := `#compdef minikube
`

Expand Down Expand Up @@ -300,17 +300,17 @@ __minikube_convert_bash_to_zsh() {
<<'BASH_COMPLETION_EOF'
`

_, err := out.Write([]byte(zshAutoloadTag))
_, err := w.Write([]byte(zshAutoloadTag))
if err != nil {
return err
}

_, err = out.Write([]byte(boilerPlate))
_, err = w.Write([]byte(boilerPlate))
if err != nil {
return err
}

_, err = out.Write([]byte(zshInitialization))
_, err = w.Write([]byte(zshInitialization))
if err != nil {
return err
}
Expand All @@ -320,7 +320,7 @@ __minikube_convert_bash_to_zsh() {
if err != nil {
return errors.Wrap(err, "Error generating zsh completion")
}
_, err = out.Write(buf.Bytes())
_, err = w.Write(buf.Bytes())
if err != nil {
return err
}
Expand All @@ -330,7 +330,7 @@ BASH_COMPLETION_EOF
}
__minikube_bash_source <(__minikube_convert_bash_to_zsh)
`
_, err = out.Write([]byte(zshTail))
_, err = w.Write([]byte(zshTail))
if err != nil {
return err
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/minikube/cmd/config/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func loadAddonConfigFile(addon, configFilePath string) (ac *addonConfig) {
type configFile struct {
Addons addonConfig `json:"addons"`
}
var config configFile
var cf configFile

if configFilePath != "" {
out.Ln("Reading %s configs from %s", addon, configFilePath)
Expand All @@ -150,14 +150,14 @@ func loadAddonConfigFile(addon, configFilePath string) (ac *addonConfig) {
fmt.Sprintf("error opening config file: %s", configFilePath))
}

if err = json.Unmarshal(confData, &config); err != nil {
if err = json.Unmarshal(confData, &cf); err != nil {
// err = errors2.Wrapf(err, "error reading config file (%s)", configFilePath)
klog.Errorf("error reading config file (%s): %v", configFilePath, err)
exit.Message(reason.Kind{ExitCode: reason.ExProgramConfig, Advice: "provide a valid config file"},
fmt.Sprintf("error reading config file: %v", err))
}

return &config.Addons
return &cf.Addons
}
return nil
}
Expand Down
40 changes: 24 additions & 16 deletions cmd/minikube/cmd/config/configure_registry_creds.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ func processRegistryCredsConfig(profile string, ac *addonConfig) {

regCredsConf := &ac.RegistryCreds
awsEcrAction := regCredsConf.EnableAWSEcr // regCredsConf. "enableAWSEcr")
if awsEcrAction == "prompt" || awsEcrAction == "" {

switch awsEcrAction {
case "prompt", "":
enableAWSECR := AskForYesNoConfirmation("\nDo you want to enable AWS Elastic Container Registry?", posResponses, negResponses)
if enableAWSECR {
awsAccessID = AskForStaticValue("-- Enter AWS Access Key ID: ")
Expand All @@ -102,7 +104,7 @@ func processRegistryCredsConfig(profile string, ac *addonConfig) {
awsAccount = AskForStaticValue("-- Enter 12 digit AWS Account ID (Comma separated list): ")
awsRole = AskForStaticValueOptional("-- (Optional) Enter ARN of AWS role to assume: ")
}
} else if awsEcrAction == "enable" {
case "enable":
out.Ln("Loading AWS ECR configs from: %s", addonConfigFile)
// Then read the configs
awsAccessID = regCredsConf.EcrConfigs.AccessID
Expand All @@ -111,15 +113,17 @@ func processRegistryCredsConfig(profile string, ac *addonConfig) {
awsRegion = regCredsConf.EcrConfigs.Region
awsAccount = regCredsConf.EcrConfigs.Account
awsRole = regCredsConf.EcrConfigs.Role
} else if awsEcrAction == "disable" {
case "disable":
out.Ln("Ignoring AWS ECR configs")
} else {
default:
out.Ln("Disabling AWS ECR. Invalid value for enableAWSEcr (%s). Must be one of 'disable', 'enable' or 'prompt'", awsEcrAction)
}

gcrPath := ""
gcrAction := regCredsConf.EnableGCR
if gcrAction == "prompt" || gcrAction == "" {

switch gcrAction {
case "prompt", "":
enableGCR := AskForYesNoConfirmation("\nDo you want to enable Google Container Registry?", posResponses, negResponses)
if enableGCR {
gcrPath = AskForStaticValue("-- Enter path to credentials (e.g. /home/user/.config/gcloud/application_default_credentials.json):")
Expand All @@ -129,14 +133,14 @@ func processRegistryCredsConfig(profile string, ac *addonConfig) {
gcrURL = AskForStaticValue("-- Enter GCR URL (e.g. https://asia.gcr.io):")
}
}
} else if gcrAction == "enable" {
case "enable":
out.Ln("Loading GCR configs from: %s", addonConfigFile)
// Then read the configs
gcrPath = regCredsConf.GcrConfigs.GcrPath
gcrURL = regCredsConf.GcrConfigs.GcrURL
} else if gcrAction == "disable" {
case "disable":
out.Ln("Ignoring GCR configs")
} else {
default:
out.Ln("Disabling GCR. Invalid value for enableGCR (%s). Must be one of 'disable', 'enable' or 'prompt'", gcrAction)
}

Expand All @@ -152,40 +156,44 @@ func processRegistryCredsConfig(profile string, ac *addonConfig) {
}

dockerRegistryAction := regCredsConf.EnableDockerRegistry
if dockerRegistryAction == "prompt" || dockerRegistryAction == "" {

switch dockerRegistryAction {
case "prompt", "":
enableDR := AskForYesNoConfirmation("\nDo you want to enable Docker Registry?", posResponses, negResponses)
if enableDR {
dockerServer = AskForStaticValue("-- Enter docker registry server url: ")
dockerUser = AskForStaticValue("-- Enter docker registry username: ")
dockerPass = AskForPasswordValue("-- Enter docker registry password: ")
}
} else if dockerRegistryAction == "enable" {
case "enable":
out.Ln("Loading Docker Registry configs from: %s", addonConfigFile)
dockerServer = regCredsConf.DockerConfigs.DockerServer
dockerUser = regCredsConf.DockerConfigs.DockerUser
dockerPass = regCredsConf.DockerConfigs.DockerPass
} else if dockerRegistryAction == "disable" {
case "disable":
out.Ln("Ignoring Docker Registry configs")
} else {
default:
out.Ln("Disabling Docker Registry. Invalid value for enableDockerRegistry (%s). Must be one of 'disable', 'enable' or 'prompt'", dockerRegistryAction)
}

acrAction := regCredsConf.EnableACR
if acrAction == "prompt" || acrAction == "" {

switch acrAction {
case "prompt", "":
enableACR := AskForYesNoConfirmation("\nDo you want to enable Azure Container Registry?", posResponses, negResponses)
if enableACR {
acrURL = AskForStaticValue("-- Enter Azure Container Registry (ACR) URL: ")
acrClientID = AskForStaticValue("-- Enter client ID (service principal ID) to access ACR: ")
acrPassword = AskForPasswordValue("-- Enter service principal password to access Azure Container Registry: ")
}
} else if acrAction == "enable" {
case "enable":
out.Ln("Loading ACR configs from: ", addonConfigFile)
acrURL = regCredsConf.AcrConfigs.AcrURL
acrClientID = regCredsConf.AcrConfigs.AcrClientID
acrPassword = regCredsConf.AcrConfigs.AcrPassword
} else if acrAction == "disable" {
case "disable":
out.Ln("Ignoring ACR configs")
} else {
default:
out.Stringf("Disabling ACR. Invalid value for enableACR (%s). Must be one of 'disable', 'enable' or 'prompt'", acrAction)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/config/kubernetes_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"context"
"net/http"

"github.com/google/go-github/v72/github"
"github.com/google/go-github/v73/github"
"golang.org/x/mod/semver"
"k8s.io/minikube/pkg/minikube/constants"
)
Expand Down
24 changes: 20 additions & 4 deletions cmd/minikube/cmd/config/profile_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ import (
"k8s.io/klog/v2"
)

var profileOutput string
var isLight bool
var (
profileOutput string
isLight bool
isDetailed bool
)

var profileListCmd = &cobra.Command{
Use: "list",
Expand Down Expand Up @@ -130,7 +133,13 @@ func profileStatus(p *config.Profile, api libmachine.API) cluster.State {

func renderProfilesTable(ps [][]string) {
table := tablewriter.NewWriter(os.Stdout)
table.SetHeader([]string{"Profile", "VM Driver", "Runtime", "IP", "Port", "Version", "Status", "Nodes", "Active Profile", "Active Kubecontext"})
if isDetailed {
table.SetHeader([]string{"Profile", "Driver", "Runtime", "IP", "Port", "Version",
"Status", "Nodes", "Active Profile", "Active Kubecontext"})
} else {
table.SetHeader([]string{"Profile", "Driver", "Runtime", "IP", "Version", "Status",
"Nodes", "Active Profile", "Active Kubecontext"})
}
table.SetAutoFormatHeaders(false)
table.SetBorders(tablewriter.Border{Left: true, Top: true, Right: true, Bottom: true})
table.SetCenterSeparator("|")
Expand Down Expand Up @@ -164,7 +173,13 @@ func profilesToTableData(profiles []*config.Profile) [][]string {
if p.ActiveKubeContext {
k = "*"
}
data = append(data, []string{p.Name, p.Config.Driver, p.Config.KubernetesConfig.ContainerRuntime, cpIP, strconv.Itoa(cpPort), k8sVersion, p.Status, strconv.Itoa(len(p.Config.Nodes)), c, k})
if isDetailed {
data = append(data, []string{p.Name, p.Config.Driver, p.Config.KubernetesConfig.ContainerRuntime,
cpIP, strconv.Itoa(cpPort), k8sVersion, p.Status, strconv.Itoa(len(p.Config.Nodes)), c, k})
} else {
data = append(data, []string{p.Name, p.Config.Driver, p.Config.KubernetesConfig.ContainerRuntime,
cpIP, k8sVersion, p.Status, strconv.Itoa(len(p.Config.Nodes)), c, k})
}
}
return data
}
Expand Down Expand Up @@ -213,5 +228,6 @@ func profilesOrDefault(profiles []*config.Profile) []*config.Profile {
func init() {
profileListCmd.Flags().StringVarP(&profileOutput, "output", "o", "table", "The output format. One of 'json', 'table'")
profileListCmd.Flags().BoolVarP(&isLight, "light", "l", false, "If true, returns list of profiles faster by skipping validating the status of the cluster.")
profileListCmd.Flags().BoolVarP(&isDetailed, "detailed", "d", false, "If true, returns a detailed list of profiles.")
ProfileCmd.AddCommand(profileListCmd)
}
Loading