func (r *ReconcileRethinkDBCluster) removePVC(cr *rethinkdbv1alpha1.RethinkDBCluster, pvcs []corev1.PersistentVolumeClaim) error {
	if len(pvcs) <= 0 {
		return nil
	}

	for _, pvc := range pvcs {
		if pvc.Status.Phase == corev1.ClaimPending {
			log.Info("removing existing persistent volume claim", "pvc", pvc.ObjectMeta.Name)
			err := r.client.Delete(context.TODO(), &pvc)
			if err != nil {
				return err
			}
		}
	}

	// Nothing to remove...
	return nil
}
// removePVC will delete a PVC from the cluster. The first unbound PVC in the provided slice of PVCs will be deleted.
removePVC will delete a PVC from the cluster. The first unbound PVC in the provided slice of PVCs will be deleted.
// removePVC will delete a PVC from the cluster . The first unbound PVC in the provided slice of PVCs will be deleted .
func (r *ReconcileRethinkDBCluster) removePVC(cr *rethinkdbv1alpha1.RethinkDBCluster, pvcs []corev1.PersistentVolumeClaim) error {
	if len(pvcs) <= 0 {
		return nil
	}
	for _, pvc := range pvcs {
		if pvc.Status.Phase == corev1.ClaimPending {
			log.Info("removing existing persistent volume claim", "pvc", pvc.ObjectMeta.Name)
			err := r.client.Delete(context.TODO(), &pvc)
			if err != nil {
				return err
			}
		}
	}
	return nil
}
func ( r * ReconcileRethinkDBCluster ) removePVC ( cr * rethinkdbv1alpha1 . RethinkDBCluster , pvcs [ ] corev1 . PersistentVolumeClaim ) error { if len ( pvcs ) <= 0 { return nil } for _ , pvc := range pvcs { if pvc . Status . Phase == corev1 . ClaimPending { log . Info ( " " , " " , pvc . ObjectMeta . Name ) err := r . client . Delete ( context . TODO ( ) , & pvc ) if err != nil { return err } } } return nil }
removePVC will delete a PVC from the cluster.
removePVC will delete a PVC from the cluster .
// Nothing to remove...