Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdCleanup ¶
func NewCmdCleanup(streams genericclioptions.IOStreams) *cobra.Command
NewCmdCleanup provides a cobra command wrapping CleanupOptions
Types ¶
type CleanupOptions ¶
type CleanupOptions struct { PrintFlags *genericclioptions.PrintFlags PrintObject printers.ResourcePrinterFunc RawConfig *clientcmdapi.Config // the starting kubeconfig ResultingConfig *clientcmdapi.Config // holds configs we are keeping CleanedUpConfig *clientcmdapi.Config // holds configs that were removed CleanupIgnoreConfig *v1.ConfigMap IgnoreContexts []string ConnectTimeoutSeconds int KubeconfigPath string CleanupUsers bool CleanupClusters bool PrintRaw bool PrintRemoved bool genericclioptions.IOStreams }
CleanupOptions holds configs used to cleanup a kubeconfig file
func (*CleanupOptions) Complete ¶
func (o *CleanupOptions) Complete(cmd *cobra.Command, args []string) error
Complete sets all information required for cleaning up the current KUBECONFIG
func (*CleanupOptions) NewRestClientForContext ¶ added in v0.4.0
func (o *CleanupOptions) NewRestClientForContext(ctxname string) (*kubernetes.Clientset, error)
NewRestClientForContext initializes an API server REST client from a given context
func (*CleanupOptions) Run ¶
func (o *CleanupOptions) Run() error
Run cleans up the user's current KUBECONFIG and prints the result to stdout
func (*CleanupOptions) Validate ¶
func (o *CleanupOptions) Validate() error
Validate ensures that all required arguments and flag values are provided
Click to show internal directories.
Click to hide internal directories.