code: func MigrateOldConfig(oldConfig []byte) ([]byte, error) {
  	newConfig := [][]byte{}
  
  	gvkmap, err := kubeadmutil.SplitYAMLDocuments(oldConfig)
  	if err != nil {
  		return []byte{}, err
  	}
  
  	gvks := []schema.GroupVersionKind{}
  	for gvk := range gvkmap {
  		gvks = append(gvks, gvk)
  	}
  
  	// Migrate InitConfiguration and ClusterConfiguration if there are any in the config
  	if kubeadmutil.GroupVersionKindsHasInitConfiguration(gvks...) || kubeadmutil.GroupVersionKindsHasClusterConfiguration(gvks...) {
  		o, err := documentMapToInitConfiguration(gvkmap, true)
  		if err != nil {
  			return []byte{}, err
  		}
  		b, err := MarshalKubeadmConfigObject(o)
  		if err != nil {
  			return []byte{}, err
  		}
  		newConfig = append(newConfig, b)
  	}
  
  	// Migrate JoinConfiguration if there is any
  	if kubeadmutil.GroupVersionKindsHasJoinConfiguration(gvks...) {
  		o, err := documentMapToJoinConfiguration(gvkmap, true)
  		if err != nil {
  			return []byte{}, err
  		}
  		b, err := MarshalKubeadmConfigObject(o)
  		if err != nil {
  			return []byte{}, err
  		}
  		newConfig = append(newConfig, b)
  	}
  
  	return bytes.Join(newConfig, []byte(constants.YAMLDocumentSeparator)), nil
  }
docs: // MigrateOldConfig migrates an old configuration from a byte slice into a new one (returned again as a byte slice).
  // Only kubeadm kinds are migrated. Others are silently ignored.