code: func CreateOrUpdateConfigMap(client clientset.Interface, cm *v1.ConfigMap) error {
  	if _, err := client.CoreV1().ConfigMaps(cm.ObjectMeta.Namespace).Create(cm); err != nil {
  		if !apierrors.IsAlreadyExists(err) {
  			return errors.Wrap(err, "unable to create configmap")
  		}
  
  		if _, err := client.CoreV1().ConfigMaps(cm.ObjectMeta.Namespace).Update(cm); err != nil {
  			return errors.Wrap(err, "unable to update configmap")
  		}
  	}
  	return nil
  }
docs: // TODO: We should invent a dynamic mechanism for this using the dynamic client instead of hard-coding these functions per-type
  // CreateOrUpdateConfigMap creates a ConfigMap if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.