code: func loadConfiguration(config io.Reader) (*internalapi.Configuration, error) {
  	// if no config is provided, return a default configuration
  	if config == nil {
  		externalConfig := &versionedapi.Configuration{}
  		scheme.Default(externalConfig)
  		internalConfig := &internalapi.Configuration{}
  		if err := scheme.Convert(externalConfig, internalConfig, nil); err != nil {
  			return nil, err
  		}
  		return internalConfig, nil
  	}
  	// we have a config so parse it.
  	data, err := ioutil.ReadAll(config)
  	if err != nil {
  		return nil, err
  	}
  	decoder := codecs.UniversalDecoder()
  	decodedObj, err := runtime.Decode(decoder, data)
  	if err != nil {
  		return nil, err
  	}
  	externalConfig, ok := decodedObj.(*internalapi.Configuration)
  	if !ok {
  		return nil, fmt.Errorf("unexpected type: %T", decodedObj)
  	}
  
  	if err := validation.ValidateConfiguration(externalConfig); err != nil {
  		return nil, err
  	}
  
  	return externalConfig, nil
  }
docs: // LoadConfiguration loads the provided configuration.