package
12.0.0+incompatible
Repository: https://github.com/kubernetes/client-go.git
Documentation: pkg.go.dev
# Functions
BindAuthInfoFlags is a convenience method to bind the specified flags to their associated variables.
BindClusterFlags is a convenience method to bind the specified flags to their associated variables.
BindFlags is a convenience method to bind the specified flags to their associated variables.
BindOverrideFlags is a convenience method to bind the specified flags to their associated variables.
BuildConfigFromFlags is a helper function that builds configs from a master url or a kubeconfig filepath.
BuildConfigFromKubeconfigGetter is a helper function that builds configs from a master url and a kubeconfigGetter.
ConfirmUsable looks a particular context and determines if that particular part of the config is useable.
GetConfigFromFileOrDie tries to read a kubeconfig file and if it can't, it calls exit.
IsConfigurationInvalid returns true if the provided error indicates the configuration is invalid.
IsContextNotFound returns a boolean indicating whether the error is known to report that a context was not found.
IsEmptyConfig returns true if the provided error indicates the provided configuration is empty.
Load takes a byte slice and deserializes the contents into Config object.
LoadFromFile takes a filename and deserializes the contents into Config object.
ModifyConfig takes a Config object, iterates through Clusters, AuthInfos, and Contexts, uses the LocationOfOrigin if specified or uses the default destination file to write the results into.
NewClientConfigFromBytes takes your kubeconfig and gives you back a ClientConfig.
NewDefaultAuthLoader returns a default implementation of an AuthLoader that only reads from a config file.
NewDefaultClientConfig creates a DirectClientConfig using the config.CurrentContext as the context name.
NewDefaultClientConfigLoadingRules returns a ClientConfigLoadingRules object with default fields filled in.
NewInteractiveClientConfig creates a DirectClientConfig using the passed context name and a reader in case auth information is not provided via files or flags.
NewInteractiveDeferredLoadingClientConfig creates a ConfigClientClientConfig using the passed context name and the fallback auth reader.
NewNonInteractiveClientConfig creates a DirectClientConfig using the passed context name and does not have a fallback reader for auth information.
NewNonInteractiveDeferredLoadingClientConfig creates a ConfigClientClientConfig using the passed context name.
NewPromptingAuthLoader is an AuthLoader that parses an AuthInfo object from a file path.
ParseTimeout returns a parsed duration from a string A duration string value must be a positive integer, optionally followed by a corresponding time unit (s|m|h).
RecommendedAuthOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing.
RecommendedClusterOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing.
RecommendedConfigOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing.
RecommendedContextOverrideFlags is a convenience method to return recommended flag names prefixed with a string of your choosing.
RelativizeAuthInfoLocalPaths first absolutizes the paths by calling ResolveLocalPaths.
RelativizeClusterLocalPaths first absolutizes the paths by calling ResolveLocalPaths.
RelativizePathWithNoBacksteps updates the given refs to be relative paths, relative to the given base directory as long as they do not require backsteps.
RemoveNamespacesPrefix is a transformer that strips "ns/", "namespace/" and "namespaces/" prefixes case-insensitively.
ResolveLocalPaths resolves all relative paths in the config object with respect to the stanza's LocationOfOrigin this cannot be done directly inside of LoadFromFile because doing so there would make it impossible to load a file without modification of its contents.
ResolvePaths updates the given refs to be absolute paths, relative to the given base directory.
RESTConfigFromKubeConfig is a convenience method to give back a restconfig from your kubeconfig bytes.
Validate checks for errors in the Config.
Write serializes the config to yaml.
WriteToFile serializes the config to yaml and writes it out to a file.
# Variables
ClusterDefaults has the same behavior as the old EnvVar and DefaultCluster fields DEPRECATED will be replaced.
DefaultClientConfig represents the legacy behavior of this package for defaulting DEPRECATED will be replace.
message is for consistency with old behavior.
# Structs
AuthOverrideFlags holds the flag names to be used for binding command line flags for AuthInfo objects.
ClientConfigLoadingRules is an ExplicitPath and string slice of specific locations that are used for merging together a Config Callers can put the chain together however they want, but we'd recommend: EnvVarPathFiles if set (a list of files if set) OR the HomeDirectoryPath ExplicitPath is special, because if a user specifically requests a certain file be used and error is reported if this file is not present.
ClusterOverride holds the flag names to be used for binding command line flags for Cluster objects.
ConfigOverrideFlags holds the flag names to be used for binding command line flags.
ConfigOverrides holds values that should override whatever information is pulled from the actual Config object.
ContextOverrideFlags holds the flag names to be used for binding command line flags for Cluster objects.
DeferredLoadingClientConfig is a ClientConfig interface that is backed by a client config loader.
DirectClientConfig is a ClientConfig interface that is backed by a clientcmdapi.Config, options overrides, and an optional fallbackReader for auth information.
FlagInfo contains information about how to register a flag.
# Interfaces
AuthLoaders are used to build clientauth.Info objects.
ClientConfig is used to make it easy to get an api server client.
ConfigAccess is used by subcommands and methods in this package to load and modify the appropriate config files.
InClusterConfig abstracts details of whether the client is running in a cluster for testing.