code: func CreateOrUpdateDeployment(client clientset.Interface, deploy *apps.Deployment) error {
  	if _, err := client.AppsV1().Deployments(deploy.ObjectMeta.Namespace).Create(deploy); err != nil {
  		if !apierrors.IsAlreadyExists(err) {
  			return errors.Wrap(err, "unable to create deployment")
  		}
  
  		if _, err := client.AppsV1().Deployments(deploy.ObjectMeta.Namespace).Update(deploy); err != nil {
  			return errors.Wrap(err, "unable to update deployment")
  		}
  	}
  	return nil
  }
docs: // CreateOrUpdateDeployment creates a Deployment if the target resource doesn't exist. If the resource exists already, this function will update the resource instead.