func (app *App) Complete(clientConfig clientcmd.ClientConfig) error {
	p := app.ExecOptions
	// Let kubectl exec follow rules for `--`, see #13004 issue
	if len(p.PodName) == 0 {
		return fmt.Errorf("POD is required for exec")
	}
	if len(p.Command) < 1 {
		return fmt.Errorf("COMMAND is required for exec")
	}
	if clientConfig == nil {
		return fmt.Errorf("kubeconfig is required for exec")
	}

	namespace, _, err := clientConfig.Namespace() //f.DefaultNamespace()
	if err != nil {
		return err
	}
	p.Namespace = namespace

	config, err := clientConfig.ClientConfig() //f.ClientConfig()
	if err != nil {
		return err
	}
	p.Config = config

	client, err := kclient.New(config) //f.Client()
	if err != nil {
		return err
	}
	p.Client = client

	return nil
}
// Complete verifies command line arguments and loads data from the command environment
Complete verifies command line arguments and loads data from the command environment
// Complete verifies command line arguments and loads data from the command environment
func (app *App) Complete(clientConfig clientcmd.ClientConfig) error {
	p := app.ExecOptions
	if len(p.PodName) == 0 {
		return fmt.Errorf("POD is required for exec")
	}
	if len(p.Command) < 1 {
		return fmt.Errorf("COMMAND is required for exec")
	}
	if clientConfig == nil {
		return fmt.Errorf("kubeconfig is required for exec")
	}
	namespace, _, err := clientConfig.Namespace() 
	if err != nil {
		return err
	}
	p.Namespace = namespace
	config, err := clientConfig.ClientConfig() 
	if err != nil {
		return err
	}
	p.Config = config
	client, err := kclient.New(config) 
	if err != nil {
		return err
	}
	p.Client = client
	return nil
}
func ( app * App ) Complete ( clientConfig clientcmd . ClientConfig ) error { p := app . ExecOptions if len ( p . PodName ) == 0 { return fmt . Errorf ( " " ) } if len ( p . Command ) < 1 { return fmt . Errorf ( " " ) } if clientConfig == nil { return fmt . Errorf ( " " ) } namespace , _ , err := clientConfig . Namespace ( ) if err != nil { return err } p . Namespace = namespace config , err := clientConfig . ClientConfig ( ) if err != nil { return err } p . Config = config client , err := kclient . New ( config ) if err != nil { return err } p . Client = client return nil }
Complete verifies command line arguments and loads data from the command environment
Complete verifies command line arguments and loads data from the command environment
// Let kubectl exec follow rules for `--`, see #13004 issue //f.DefaultNamespace() //f.ClientConfig() //f.Client()