func (r *Resources) runPVCFinalizers(ctx context.Context, p *v1.PersistentVolumeClaim, group api.ServerGroup,
	memberStatus api.MemberStatus) (util.Interval, error) {
	log := r.log.With().Str("pvc-name", p.GetName()).Logger()
	var removalList []string
	for _, f := range p.ObjectMeta.GetFinalizers() {
		switch f {
		case constants.FinalizerPVCMemberExists:
			log.Debug().Msg("Inspecting member exists finalizer")
			if err := r.inspectFinalizerPVCMemberExists(ctx, log, group, memberStatus); err == nil {
				removalList = append(removalList, f)
			} else {
				log.Debug().Err(err).Str("finalizer", f).Msg("Cannot remove finalizer yet")
			}
		}
	}
	if len(removalList) > 0 {
		err := k8sutil.RemovePVCFinalizers(ctx, r.context.GetCachedStatus(), log, r.context.PersistentVolumeClaimsModInterface(), p, removalList, false)
		if err != nil {
			log.Debug().Err(err).Msg("Failed to update PVC (to remove finalizers)")
			return 0, errors.WithStack(err)
		}
	} else {
		return recheckPVCFinalizerInterval, nil
	}
	return maxPVCInspectorInterval, nil
}
runPVCFinalizers goes through the list of PVC finalizers to see if they can be removed.
package resources
import (
	"context"
	"time"
	"github.com/arangodb/kube-arangodb/pkg/util/errors"
	"github.com/rs/zerolog"
	v1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
	"github.com/arangodb/kube-arangodb/pkg/util"
	"github.com/arangodb/kube-arangodb/pkg/util/constants"
	"github.com/arangodb/kube-arangodb/pkg/util/k8sutil"
)
const (
	recheckPVCFinalizerInterval = util.Interval(time.Second * 5)  
)