func newCmdKubeletConfigEnableDynamic() *cobra.Command {
	var nodeName, kubeletVersionStr string
	var kubeConfigFile string

	cmd := &cobra.Command{
		Use:     "enable-dynamic",
		Short:   "DEPRECATED: Enable or update dynamic kubelet configuration for a Node",
		Long:    kubeletConfigEnableDynamicLongDesc,
		Example: kubeletConfigEnableDynamicExample,
		Deprecated: "This command is deprecated and will be removed in a future release. Please defer to the official \"Dynamic Kubelet Configuration\" " +
			"guide at k8s.io if you wish to use this feature",
		RunE: func(cmd *cobra.Command, args []string) error {
			if len(nodeName) == 0 {
				return errors.New("the --node-name argument is required")
			}
			if len(kubeletVersionStr) == 0 {
				return errors.New("the --kubelet-version argument is required")
			}

			kubeletVersion, err := version.ParseSemantic(kubeletVersionStr)
			if err != nil {
				return err
			}

			kubeConfigFile = cmdutil.GetKubeConfigPath(kubeConfigFile)
			client, err := kubeconfigutil.ClientSetFromFile(kubeConfigFile)
			if err != nil {
				return err
			}

			return kubeletphase.EnableDynamicConfigForNode(client, nodeName, kubeletVersion)
		},
		Args: cobra.NoArgs,
	}

	options.AddKubeConfigFlag(cmd.Flags(), &kubeConfigFile)
	cmd.Flags().StringVar(&nodeName, options.NodeName, nodeName, "Name of the node that should enable the dynamic kubelet configuration")
	cmd.Flags().StringVar(&kubeletVersionStr, "kubelet-version", kubeletVersionStr, "The desired version for the kubelet")
	return cmd
}
// newCmdKubeletConfigEnableDynamic calls cobra.Command for enabling dynamic kubelet configuration on node
// This feature is still in alpha and an experimental state
newCmdKubeletConfigEnableDynamic calls cobra.Command for enabling dynamic kubelet configuration on node
This feature is still in alpha and an experimental state
// newCmdKubeletConfigEnableDynamic calls cobra . Command for enabling dynamic kubelet configuration on node // This feature is still in alpha and an experimental state
func newCmdKubeletConfigEnableDynamic() *cobra.Command {
	var nodeName, kubeletVersionStr string
	var kubeConfigFile string
	cmd := &cobra.Command{
		Use:     "enable-dynamic",
		Short:   "DEPRECATED: Enable or update dynamic kubelet configuration for a Node",
		Long:    kubeletConfigEnableDynamicLongDesc,
		Example: kubeletConfigEnableDynamicExample,
		Deprecated: "This command is deprecated and will be removed in a future release. Please defer to the official \"Dynamic Kubelet Configuration\" " +
			"guide at k8s.io if you wish to use this feature",
		RunE: func(cmd *cobra.Command, args []string) error {
			if len(nodeName) == 0 {
				return errors.New("the --node-name argument is required")
			}
			if len(kubeletVersionStr) == 0 {
				return errors.New("the --kubelet-version argument is required")
			}
			kubeletVersion, err := version.ParseSemantic(kubeletVersionStr)
			if err != nil {
				return err
			}
			kubeConfigFile = cmdutil.GetKubeConfigPath(kubeConfigFile)
			client, err := kubeconfigutil.ClientSetFromFile(kubeConfigFile)
			if err != nil {
				return err
			}
			return kubeletphase.EnableDynamicConfigForNode(client, nodeName, kubeletVersion)
		},
		Args: cobra.NoArgs,
	}
	options.AddKubeConfigFlag(cmd.Flags(), &kubeConfigFile)
	cmd.Flags().StringVar(&nodeName, options.NodeName, nodeName, "Name of the node that should enable the dynamic kubelet configuration")
	cmd.Flags().StringVar(&kubeletVersionStr, "kubelet-version", kubeletVersionStr, "The desired version for the kubelet")
	return cmd
}
func newCmdKubeletConfigEnableDynamic ( ) * cobra . Command { var nodeName , kubeletVersionStr string var kubeConfigFile string cmd := & cobra . Command { Use : " " , Short : " " , Long : kubeletConfigEnableDynamicLongDesc , Example : kubeletConfigEnableDynamicExample , Deprecated : " \" \" " + " " , RunE : func ( cmd * cobra . Command , args [ ] string ) error { if len ( nodeName ) == 0 { return errors . New ( " " ) } if len ( kubeletVersionStr ) == 0 { return errors . New ( " " ) } kubeletVersion , err := version . ParseSemantic ( kubeletVersionStr ) if err != nil { return err } kubeConfigFile = cmdutil . GetKubeConfigPath ( kubeConfigFile ) client , err := kubeconfigutil . ClientSetFromFile ( kubeConfigFile ) if err != nil { return err } return kubeletphase . EnableDynamicConfigForNode ( client , nodeName , kubeletVersion ) } , Args : cobra . NoArgs , } options . AddKubeConfigFlag ( cmd . Flags ( ) , & kubeConfigFile ) cmd . Flags ( ) . StringVar ( & nodeName , options . NodeName , nodeName , " " ) cmd . Flags ( ) . StringVar ( & kubeletVersionStr , " " , kubeletVersionStr , " " ) return cmd }
newCmdKubeletConfigEnableDynamic calls cobra.Command for enabling dynamic kubelet configuration on node
This feature is still in alpha and an experimental state
newCmdKubeletConfigEnableDynamic calls cobra . Command for enabling dynamic kubelet configuration on node This feature is still in alpha and an experimental state