kubernetesk8s.io/kubernetes/cmd/kubeadm/app/cmd/util Index | Files

package util

import "k8s.io/kubernetes/cmd/kubeadm/app/cmd/util"

Index

Variables

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

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

AddCRISocketFlag adds the cri-socket flag to the supplied flagSet

func GetJoinControlPlaneCommand

func GetJoinControlPlaneCommand(kubeConfigFile, token, key string, skipTokenPrint, skipCertificateKeyPrint bool) (string, error)

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

func GetJoinWorkerCommand

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

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

func GetKubeConfigPath

func GetKubeConfigPath(file string) string

GetKubeConfigPath can be used to search for a kubeconfig in standard locations if and empty string is passed to the function. If a non-empty string is passed the function returns the same string.

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

Source Files

cmdutil.go documentation.go join.go

Version
v1.15.0-beta.2
Published
Jun 5, 2019
Platform
js/wasm
Imports
15 packages
Last checked
1 minute ago

Tools for package owners.