cmd

package
v1.12.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 1, 2020 License: Apache-2.0 Imports: 88 Imported by: 85

Documentation

Index

Constants

View Source
const (
	// Fatal is a type of DeletionError
	Fatal typeOfError = 0
	// MissingProfile is a type of DeletionError
	MissingProfile typeOfError = 1
	// MissingCluster is a type of DeletionError
	MissingCluster typeOfError = 2
)
View Source
const (

	// Configured means configured
	Configured = "Configured" // ~state.Saved
	// Misconfigured means misconfigured
	Misconfigured = "Misconfigured" // ~state.Error

	// Nonexistent means nonexistent
	Nonexistent = "Nonexistent" // ~state.None
	// Irrelevant is used for statuses that aren't meaningful for worker nodes
	Irrelevant = "Irrelevant"
)

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "minikube",
	Short: "minikube quickly sets up a local Kubernetes cluster",
	Long:  `minikube provisions and manages local Kubernetes clusters optimized for development workflows.`,
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		for _, path := range dirs {
			if err := os.MkdirAll(path, 0777); err != nil {
				exit.WithError("Error creating minikube directory", err)
			}
		}

		logDir := pflag.Lookup("log_dir")
		if !logDir.Changed {
			if err := logDir.Value.Set(localpath.MakeMiniPath("logs")); err != nil {
				exit.WithError("logdir set failed", err)
			}
		}
	},
}

RootCmd represents the base command when called without any subcommands

Functions

func ClusterFlagValue added in v1.9.0

func ClusterFlagValue() string

ClusterFlagValue returns the current cluster name based on flags

func DeleteProfiles added in v1.5.0

func DeleteProfiles(profiles []*config.Profile) []error

DeleteProfiles deletes one or more profiles

func Execute

func Execute()

Execute adds all child commands to the root command sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GenerateBashCompletion added in v0.12.1

func GenerateBashCompletion(w io.Writer, cmd *cobra.Command) error

GenerateBashCompletion generates the completion for the bash shell

func GenerateFishCompletion added in v1.10.0

func GenerateFishCompletion(w io.Writer, cmd *cobra.Command) error

GenerateFishCompletion generates the completion for the bash shell

func GenerateZshCompletion added in v0.24.0

func GenerateZshCompletion(out io.Writer, cmd *cobra.Command) error

GenerateZshCompletion generates the completion for the zsh shell

func HandleDeletionErrors added in v1.5.0

func HandleDeletionErrors(errors []error)

HandleDeletionErrors handles deletion errors from DeleteProfiles

func KubectlCommand added in v1.9.1

func KubectlCommand(version string, args ...string) (*exec.Cmd, error)

KubectlCommand will return kubectl command with a version matching the cluster

Types

type CacheListTemplate added in v0.25.0

type CacheListTemplate struct {
	CacheImage string
}

CacheListTemplate represents the cache list template

type DeletionError added in v1.5.0

type DeletionError struct {
	Err     error
	Errtype typeOfError
}

DeletionError can be returned from DeleteProfiles

func (DeletionError) Error added in v1.5.0

func (error DeletionError) Error() string

type DockerEnvConfig added in v1.7.3

type DockerEnvConfig struct {
	shell.EnvConfig
	// contains filtered or unexported fields
}

DockerEnvConfig encapsulates all external inputs into shell generation for Docker

type DockerShellConfig added in v1.7.3

type DockerShellConfig struct {
	shell.Config
	DockerCertPath         string
	DockerHost             string
	DockerTLSVerify        string
	MinikubeDockerdProfile string
	NoProxyVar             string
	NoProxyValue           string
}

DockerShellConfig represents the shell config for Docker

type EnvNoProxyGetter added in v0.17.0

type EnvNoProxyGetter struct{}

EnvNoProxyGetter gets the no_proxy variable, using environment

func (EnvNoProxyGetter) GetNoProxyVar added in v0.17.0

func (EnvNoProxyGetter) GetNoProxyVar() (string, string)

GetNoProxyVar gets the no_proxy var

type NoProxyGetter added in v0.17.0

type NoProxyGetter interface {
	GetNoProxyVar() (string, string)
}

NoProxyGetter gets the no_proxy variable

type PodmanEnvConfig added in v1.7.3

type PodmanEnvConfig struct {
	shell.EnvConfig
	// contains filtered or unexported fields
}

PodmanEnvConfig encapsulates all external inputs into shell generation for Podman

type PodmanShellConfig added in v1.7.3

type PodmanShellConfig struct {
	shell.Config
	VarlinkBridge         string
	MinikubePodmanProfile string
}

PodmanShellConfig represents the shell config for Podman

type Status added in v0.10.0

type Status struct {
	Name       string
	Host       string
	Kubelet    string
	APIServer  string
	Kubeconfig string
	Worker     bool
}

Status holds string representations of component states

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL