diff --git a/cmd/minikube/cmd/generate-docs.go b/cmd/minikube/cmd/generate-docs.go index a69d38b78a73..3bd6aba070fc 100644 --- a/cmd/minikube/cmd/generate-docs.go +++ b/cmd/minikube/cmd/generate-docs.go @@ -35,9 +35,6 @@ var generateDocs = &cobra.Command{ Example: "minikube generate-docs --path ", Hidden: true, Run: func(cmd *cobra.Command, args []string) { - if path == "" { - exit.UsageT("Please specify a directory to write docs to via the --path flag.") - } // if directory does not exist docsPath, err := os.Stat(path) diff --git a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go index 727e42594cda..a81f9aa21abc 100644 --- a/pkg/minikube/bootstrapper/kubeadm/kubeadm.go +++ b/pkg/minikube/bootstrapper/kubeadm/kubeadm.go @@ -369,9 +369,7 @@ func (k *Bootstrapper) client(k8s config.KubernetesConfig) (*kubernetes.Clientse return kubernetes.NewForConfig(config) } -// WaitForPods blocks until Kubernetes appears to be healthy. -// if waitForPods is nil, then wait for everything. Otherwise, only -// wait for pods specified. +// WaitForPods blocks until pods specified in podsToWaitFor appear to be healthy. func (k *Bootstrapper) WaitForPods(k8s config.KubernetesConfig, timeout time.Duration, podsToWaitFor []string) error { // Do not wait for "k8s-app" pods in the case of CNI, as they are managed // by a CNI plugin which is usually started after minikube has been brought @@ -411,6 +409,11 @@ func (k *Bootstrapper) WaitForPods(k8s config.KubernetesConfig, timeout time.Dur return nil } +// shouldWaitForPod returns true if: +// 1. podsToWaitFor is nil +// 2. name is in podsToWaitFor +// 3. ALL_PODS is in podsToWaitFor +// else, return false func shouldWaitForPod(name string, podsToWaitFor []string) bool { if podsToWaitFor == nil { return true