Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Priya Wadhwa committed Oct 29, 2019
1 parent c41eb8a commit 59978e1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 0 additions & 3 deletions cmd/minikube/cmd/generate-docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ var generateDocs = &cobra.Command{
Example: "minikube generate-docs --path <FOLDER_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)
Expand Down
9 changes: 6 additions & 3 deletions pkg/minikube/bootstrapper/kubeadm/kubeadm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 59978e1

Please sign in to comment.