code: func getNodeRegistration(kubeconfigDir string, client clientset.Interface, nodeRegistration *kubeadmapi.NodeRegistrationOptions) error {
  	// gets the name of the current node
  	nodeName, err := getNodeNameFromKubeletConfig(kubeconfigDir)
  	if err != nil {
  		return errors.Wrap(err, "failed to get node name from kubelet config")
  	}
  
  	// gets the corresponding node and retrieves attributes stored there.
  	node, err := client.CoreV1().Nodes().Get(nodeName, metav1.GetOptions{})
  	if err != nil {
  		return errors.Wrap(err, "failed to get corresponding node")
  	}
  
  	criSocket, ok := node.ObjectMeta.Annotations[constants.AnnotationKubeadmCRISocket]
  	if !ok {
  		return errors.Errorf("node %s doesn't have %s annotation", nodeName, constants.AnnotationKubeadmCRISocket)
  	}
  
  	// returns the nodeRegistration attributes
  	nodeRegistration.Name = nodeName
  	nodeRegistration.CRISocket = criSocket
  	nodeRegistration.Taints = node.Spec.Taints
  	// NB. currently nodeRegistration.KubeletExtraArgs isn't stored at node level but only in the kubeadm-flags.env
  	//     that isn't modified during upgrades
  	//     in future we might reconsider this thus enabling changes to the kubeadm-flags.env during upgrades as well
  	return nil
  }
docs: // getNodeRegistration returns the nodeRegistration for the current node