code: func addKeyFromFileToConfigMap(configMap *v1.ConfigMap, keyName, filePath string) error {
  	data, err := ioutil.ReadFile(filePath)
  	if err != nil {
  		return err
  	}
  
  	if utf8.Valid(data) {
  		return addKeyFromLiteralToConfigMap(configMap, keyName, string(data))
  	}
  
  	err = validateNewConfigMap(configMap, keyName)
  	if err != nil {
  		return err
  	}
  	configMap.BinaryData[keyName] = data
  	return nil
  }
docs: // addKeyFromFileToConfigMap adds a key with the given name to a ConfigMap, populating
  // the value with the content of the given file path, or returns an error.