Documentation ¶
Overview ¶
Note: This file is copied from cli-runtime. nolint
Index ¶
- type ConfigFlags
- func (f *ConfigFlags) AddFlags(flags *pflag.FlagSet)
- func (f *ConfigFlags) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
- func (f *ConfigFlags) ToRESTConfig() (*rest.Config, error)
- func (f *ConfigFlags) ToRESTMapper() (meta.RESTMapper, error)
- func (f *ConfigFlags) ToRawKubeConfigLoader() clientcmd.ClientConfig
- func (f *ConfigFlags) WithDeprecatedPasswordFlag() *ConfigFlags
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigFlags ¶
type ConfigFlags struct { CacheDir *string KubeConfig *string // config flags ClusterName *string AuthInfoName *string Context *string Namespace *string APIServer *string Insecure *bool CertFile *string KeyFile *string CAFile *string BearerToken *string Impersonate *string ImpersonateGroup *[]string Username *string Password *string Timeout *string // contains filtered or unexported fields }
ConfigFlags contains the flags for a kubectl config
func NewConfigFlags ¶
func NewConfigFlags(usePersistentConfig bool) *ConfigFlags
NewConfigFlags returns ConfigFlags with default values set
func (*ConfigFlags) AddFlags ¶
func (f *ConfigFlags) AddFlags(flags *pflag.FlagSet)
AddFlags binds client configuration flags to a given flagset
func (*ConfigFlags) ToDiscoveryClient ¶
func (f *ConfigFlags) ToDiscoveryClient() (discovery.CachedDiscoveryInterface, error)
ToDiscoveryClient implements RESTClientGetter. Expects the AddFlags method to have been called. Returns a CachedDiscoveryInterface using a computed RESTConfig.
func (*ConfigFlags) ToRESTConfig ¶
func (f *ConfigFlags) ToRESTConfig() (*rest.Config, error)
ToRESTConfig implements RESTClientGetter. Returns a REST client configuration based on a provided path to a .kubeconfig file, loading rules, and config flag overrides. Expects the AddFlags method to have been called.
func (*ConfigFlags) ToRESTMapper ¶
func (f *ConfigFlags) ToRESTMapper() (meta.RESTMapper, error)
ToRESTMapper returns a mapper.
func (*ConfigFlags) ToRawKubeConfigLoader ¶
func (f *ConfigFlags) ToRawKubeConfigLoader() clientcmd.ClientConfig
ToRawKubeConfigLoader binds config flag values to config overrides Returns an interactive clientConfig if the password flag is enabled, or a non-interactive clientConfig otherwise.
func (*ConfigFlags) WithDeprecatedPasswordFlag ¶
func (f *ConfigFlags) WithDeprecatedPasswordFlag() *ConfigFlags
WithDeprecatedPasswordFlag enables the username and password config flags