Versions in this module Expand all Collapse all v1 v1.5.1 Feb 8, 2017 v1.5.0 Oct 23, 2016 Changes in this version + const FlagAPIServer + const FlagAPIVersion + const FlagAuthInfoName + const FlagBearerToken + const FlagCAFile + const FlagCertFile + const FlagClusterName + const FlagContext + const FlagEmbedCerts + const FlagImpersonate + const FlagInsecure + const FlagKeyFile + const FlagNamespace + const FlagPassword + const FlagTimeout + const FlagUsername + const RecommendedConfigPathEnvVar + const RecommendedConfigPathFlag + const RecommendedFileName + const RecommendedHomeDir + const RecommendedSchemaName + var ClusterDefaults = clientcmdapi.Cluster + var DefaultClientConfig = DirectClientConfig + var ErrEmptyCluster = errors.New("cluster has no server defined") + var ErrEmptyConfig = errors.New("no configuration has been provided") + var ErrNoContext = errors.New("no context chosen") + var RecommendedHomeFile = path.Join(homedir.HomeDir(), RecommendedHomeDir, RecommendedFileName) + var RecommendedSchemaFile = path.Join(homedir.HomeDir(), RecommendedHomeDir, RecommendedSchemaName) + func BindAuthInfoFlags(authInfo *clientcmdapi.AuthInfo, flags *pflag.FlagSet, ...) + func BindClusterFlags(clusterInfo *clientcmdapi.Cluster, flags *pflag.FlagSet, ...) + func BindContextFlags(contextInfo *clientcmdapi.Context, flags *pflag.FlagSet, ...) + func BindOverrideFlags(overrides *ConfigOverrides, flags *pflag.FlagSet, ...) + func BuildConfigFromFlags(masterUrl, kubeconfigPath string) (*rest.Config, error) + func BuildConfigFromKubeconfigGetter(masterUrl string, kubeconfigGetter KubeconfigGetter) (*rest.Config, error) + func ConfirmUsable(config clientcmdapi.Config, passedContextName string) error + func GetAuthInfoFileReferences(authInfo *clientcmdapi.AuthInfo) []*string + func GetClusterFileReferences(cluster *clientcmdapi.Cluster) []*string + func GetConfigFileReferences(config *clientcmdapi.Config) []*string + func GetConfigFromFileOrDie(filename string) *clientcmdapi.Config + func IsConfigurationInvalid(err error) bool + func IsContextNotFound(err error) bool + func IsEmptyConfig(err error) bool + func Load(data []byte) (*clientcmdapi.Config, error) + func LoadFromFile(filename string) (*clientcmdapi.Config, error) + func MakeRelative(path, base string) (string, error) + func ModifyConfig(configAccess ConfigAccess, newConfig clientcmdapi.Config, relativizePaths bool) error + func PersisterForUser(configAccess ConfigAccess, user string) rest.AuthProviderConfigPersister + func RelativizeAuthInfoLocalPaths(authInfo *clientcmdapi.AuthInfo) error + func RelativizeClusterLocalPaths(cluster *clientcmdapi.Cluster) error + func RelativizeConfigPaths(config *clientcmdapi.Config, base string) error + func RelativizePathWithNoBacksteps(refs []*string, base string) error + func ResolveConfigPaths(config *clientcmdapi.Config, base string) error + func ResolveLocalPaths(config *clientcmdapi.Config) error + func ResolvePaths(refs []*string, base string) error + func Validate(config clientcmdapi.Config) error + func Write(config clientcmdapi.Config) ([]byte, error) + func WriteToFile(config clientcmdapi.Config, filename string) error + type AuthLoader interface + LoadAuth func(path string) (*clientauth.Info, error) + func NewDefaultAuthLoader() AuthLoader + type AuthOverrideFlags struct + ClientCertificate FlagInfo + ClientKey FlagInfo + Impersonate FlagInfo + Password FlagInfo + Token FlagInfo + Username FlagInfo + func RecommendedAuthOverrideFlags(prefix string) AuthOverrideFlags + type ClientConfig interface + ClientConfig func() (*rest.Config, error) + ConfigAccess func() ConfigAccess + Namespace func() (string, bool, error) + RawConfig func() (clientcmdapi.Config, error) + func NewDefaultClientConfig(config clientcmdapi.Config, overrides *ConfigOverrides) ClientConfig + func NewInteractiveClientConfig(config clientcmdapi.Config, contextName string, overrides *ConfigOverrides, ...) ClientConfig + func NewInteractiveDeferredLoadingClientConfig(loader ClientConfigLoader, overrides *ConfigOverrides, ...) ClientConfig + func NewNonInteractiveClientConfig(config clientcmdapi.Config, contextName string, overrides *ConfigOverrides, ...) ClientConfig + func NewNonInteractiveDeferredLoadingClientConfig(loader ClientConfigLoader, overrides *ConfigOverrides) ClientConfig + type ClientConfigGetter struct + func (g *ClientConfigGetter) GetDefaultFilename() string + func (g *ClientConfigGetter) GetExplicitFile() string + func (g *ClientConfigGetter) GetLoadingPrecedence() []string + func (g *ClientConfigGetter) GetStartingConfig() (*clientcmdapi.Config, error) + func (g *ClientConfigGetter) IsDefaultConfig(config *rest.Config) bool + func (g *ClientConfigGetter) IsExplicitFile() bool + func (g *ClientConfigGetter) Load() (*clientcmdapi.Config, error) + type ClientConfigLoader interface + IsDefaultConfig func(*rest.Config) bool + Load func() (*clientcmdapi.Config, error) + type ClientConfigLoadingRules struct + DefaultClientConfig ClientConfig + DoNotResolvePaths bool + ExplicitPath string + MigrationRules map[string]string + Precedence []string + func NewDefaultClientConfigLoadingRules() *ClientConfigLoadingRules + func (rules *ClientConfigLoadingRules) GetDefaultFilename() string + func (rules *ClientConfigLoadingRules) GetExplicitFile() string + func (rules *ClientConfigLoadingRules) GetLoadingPrecedence() []string + func (rules *ClientConfigLoadingRules) GetStartingConfig() (*clientcmdapi.Config, error) + func (rules *ClientConfigLoadingRules) IsDefaultConfig(config *rest.Config) bool + func (rules *ClientConfigLoadingRules) IsExplicitFile() bool + func (rules *ClientConfigLoadingRules) Load() (*clientcmdapi.Config, error) + func (rules *ClientConfigLoadingRules) Migrate() error + func (rules ClientConfigLoadingRules) ResolvePaths() bool + type ClusterOverrideFlags struct + APIServer FlagInfo + APIVersion FlagInfo + CertificateAuthority FlagInfo + InsecureSkipTLSVerify FlagInfo + func RecommendedClusterOverrideFlags(prefix string) ClusterOverrideFlags + type ConfigAccess interface + GetDefaultFilename func() string + GetExplicitFile func() string + GetLoadingPrecedence func() []string + GetStartingConfig func() (*clientcmdapi.Config, error) + IsExplicitFile func() bool + type ConfigOverrideFlags struct + AuthOverrideFlags AuthOverrideFlags + ClusterOverrideFlags ClusterOverrideFlags + ContextOverrideFlags ContextOverrideFlags + CurrentContext FlagInfo + Timeout FlagInfo + func RecommendedConfigOverrideFlags(prefix string) ConfigOverrideFlags + type ConfigOverrides struct + AuthInfo clientcmdapi.AuthInfo + ClusterDefaults clientcmdapi.Cluster + ClusterInfo clientcmdapi.Cluster + Context clientcmdapi.Context + CurrentContext string + Timeout string + type ContextOverrideFlags struct + AuthInfoName FlagInfo + ClusterName FlagInfo + Namespace FlagInfo + func RecommendedContextOverrideFlags(prefix string) ContextOverrideFlags + type DeferredLoadingClientConfig struct + func (config *DeferredLoadingClientConfig) ClientConfig() (*rest.Config, error) + func (config *DeferredLoadingClientConfig) ConfigAccess() ConfigAccess + func (config *DeferredLoadingClientConfig) Namespace() (string, bool, error) + func (config *DeferredLoadingClientConfig) RawConfig() (clientcmdapi.Config, error) + type DirectClientConfig struct + func (config *DirectClientConfig) ClientConfig() (*rest.Config, error) + func (config *DirectClientConfig) ConfigAccess() ConfigAccess + func (config *DirectClientConfig) ConfirmUsable() error + func (config *DirectClientConfig) Namespace() (string, bool, error) + func (config *DirectClientConfig) RawConfig() (clientcmdapi.Config, error) + type FlagInfo struct + Default string + Description string + LongName string + ShortName string + func (f FlagInfo) BindBoolFlag(flags *pflag.FlagSet, target *bool) + func (f FlagInfo) BindStringFlag(flags *pflag.FlagSet, target *string) + type InClusterConfig interface + Possible func() bool + type KubeconfigGetter func() (*clientcmdapi.Config, error) + type PathOptions struct + EnvVar string + ExplicitFileFlag string + GlobalFile string + GlobalFileSubpath string + LoadingRules *ClientConfigLoadingRules + func NewDefaultPathOptions() *PathOptions + func (o *PathOptions) GetDefaultFilename() string + func (o *PathOptions) GetEnvVarFiles() []string + func (o *PathOptions) GetExplicitFile() string + func (o *PathOptions) GetLoadingPrecedence() []string + func (o *PathOptions) GetStartingConfig() (*clientcmdapi.Config, error) + func (o *PathOptions) IsExplicitFile() bool + type PersistAuthProviderConfigForUser func(user string) rest.AuthProviderConfigPersister + type PromptingAuthLoader struct + func NewPromptingAuthLoader(reader io.Reader) *PromptingAuthLoader + func (a *PromptingAuthLoader) LoadAuth(path string) (*clientauth.Info, error) + func (a *PromptingAuthLoader) Prompt() (*clientauth.Info, error)