func pvcHookActionAdd(obj *corev1.PersistentVolumeClaim, hookCfg PVCHook) {
	if len(hookCfg.Annotations) != 0 {
		AddAnnotations(&obj.ObjectMeta, hookCfg.Annotations)
	}
	if len(hookCfg.Finalizers) != 0 {
		helper.AddFinalizers(&obj.ObjectMeta, hookCfg.Finalizers)
	}
	return
}
pvcHookActionAdd will add the given hook config to the given object
package hook
import (
	"github.com/openebs/dynamic-nfs-provisioner/pkg/helper"
	"github.com/pkg/errors"
	corev1 "k8s.io/api/core/v1"
)
func pvcHookAction(hookCfg *PVCHook, action ActionOp, obj interface{}) error {
	if hookCfg == nil {
		return nil
	}
	pvcObj, ok := obj.(*corev1.PersistentVolumeClaim)
	if !ok {
		return errors.Errorf("%T is not a PersistentVolumeClaim type", obj)
	}
	switch action {
	case ActionOpAddOrUpdate:
		pvcHookActionAdd(pvcObj, *hookCfg)
	case ActionOpRemove:
		pvcHookActionRemove(pvcObj, *hookCfg)
	}
	return nil
}