util

package
v1.14.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2019 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// AlphaDisclaimer to be places at the end of description of commands in alpha release
	AlphaDisclaimer = `
		Alpha Disclaimer: this command is currently alpha.
	`

	// MacroCommandLongDescription provide a standard description for "macro" commands
	MacroCommandLongDescription = normalizer.LongDesc(`
		This command is not meant to be run on its own. See list of available subcommands.
	`)
)

Functions

func AddCRISocketFlag added in v1.14.0

func AddCRISocketFlag(flagSet *pflag.FlagSet, criSocket *string)

AddCRISocketFlag adds the cri-socket flag to the supplied flagSet

func FindExistingKubeConfig added in v1.12.0

func FindExistingKubeConfig(file string) string

FindExistingKubeConfig returns the localtion of kubeconfig

func GetJoinCommand added in v1.10.0

func GetJoinCommand(kubeConfigFile string, token string, skipTokenPrint bool) (string, error)

GetJoinCommand returns the kubeadm join command for a given token and and Kubernetes cluster (the current cluster in the kubeconfig file)

func SubCmdRunE

func SubCmdRunE(name string) func(*cobra.Command, []string) error

SubCmdRunE returns a function that handles a case where a subcommand must be specified Without this callback, if a user runs just the command without a subcommand, or with an invalid subcommand, cobra will print usage information, but still exit cleanly. We want to return an error code in these cases so that the user knows that their command was invalid.

func ValidateExactArgNumber

func ValidateExactArgNumber(args []string, supportedArgs []string) error

ValidateExactArgNumber validates that the required top-level arguments are specified

Types

This section is empty.

Jump to

Keyboard shortcuts

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