code: func addKeyFromLiteralToConfigMap(configMap *api.ConfigMap, keyName, data string) error {
  	// Note, the rules for ConfigMap keys are the exact same as the ones for SecretKeys
  	// to be consistent; validation.IsSecretKey is used here intentionally.
  	if !validation.IsSecretKey(keyName) {
  		return fmt.Errorf("%v is not a valid key name for a configMap", keyName)
  	}
  	if _, entryExists := configMap.Data[keyName]; entryExists {
  		return fmt.Errorf("cannot add key %s, another key by that name already exists: %v.", keyName, configMap.Data)
  	}
  	configMap.Data[keyName] = data
  	return nil
  }
docs: // addKeyFromLiteralToConfigMap adds the given key and data to the given config map,
  // returning an error if the key is not valid or if the key already exists.