code: func documentMapToJoinConfiguration(gvkmap map[schema.GroupVersionKind][]byte, allowDeprecated bool) (*kubeadmapi.JoinConfiguration, error) {
  	joinBytes := []byte{}
  	for gvk, bytes := range gvkmap {
  		// not interested in anything other than JoinConfiguration
  		if gvk.Kind != constants.JoinConfigurationKind {
  			continue
  		}
  
  		// check if this version is supported and possibly not deprecated
  		if err := validateSupportedVersion(gvk.GroupVersion(), allowDeprecated); err != nil {
  			return nil, err
  		}
  
  		// verify the validity of the YAML
  		strict.VerifyUnmarshalStrict(bytes, gvk)
  
  		joinBytes = bytes
  	}
  
  	if len(joinBytes) == 0 {
  		return nil, errors.Errorf("no %s found in the supplied config", constants.JoinConfigurationKind)
  	}
  
  	internalcfg := &kubeadmapi.JoinConfiguration{}
  	if err := runtime.DecodeInto(kubeadmscheme.Codecs.UniversalDecoder(), joinBytes, internalcfg); err != nil {
  		return nil, err
  	}
  
  	// Applies dynamic defaults to settings not provided with flags
  	if err := SetJoinDynamicDefaults(internalcfg); err != nil {
  		return nil, err
  	}
  	// Validates cfg (flags/configs + defaults)
  	if err := validation.ValidateJoinConfiguration(internalcfg).ToAggregate(); err != nil {
  		return nil, err
  	}
  
  	return internalcfg, nil
  }
docs: // documentMapToJoinConfiguration takes a map between GVKs and YAML documents (as returned by SplitYAMLDocuments),
  // finds a JoinConfiguration, decodes it, dynamically defaults it and then validates it prior to return.