code: func CreateOrRetainConfigMap(client clientset.Interface, cm *v1.ConfigMap, configMapName string) error {
  	if _, err := client.CoreV1().ConfigMaps(cm.ObjectMeta.Namespace).Get(configMapName, metav1.GetOptions{}); err != nil {
  		if !apierrors.IsNotFound(err) {
  			return nil
  		}
  		if _, err := client.CoreV1().ConfigMaps(cm.ObjectMeta.Namespace).Create(cm); err != nil {
  			if !apierrors.IsAlreadyExists(err) {
  				return errors.Wrap(err, "unable to create configmap")
  			}
  		}
  	}
  	return nil
  }
docs: // CreateOrRetainConfigMap creates a ConfigMap if the target resource doesn't exist. If the resource exists already, this function will retain the resource instead.