diff --git a/webhook/resources/snapshot/validator.go b/webhook/resources/snapshot/validator.go index 394c438d49..06313a4211 100644 --- a/webhook/resources/snapshot/validator.go +++ b/webhook/resources/snapshot/validator.go @@ -4,8 +4,6 @@ import ( "fmt" "reflect" - "github.com/pkg/errors" - "k8s.io/apimachinery/pkg/runtime" admissionregv1 "k8s.io/api/admissionregistration/v1" @@ -52,15 +50,6 @@ func (o *snapshotValidator) Create(request *admission.Request, newObj runtime.Ob if snapshot.Spec.Volume == "" { return werror.NewInvalidError("spec.volume is required", "spec.volume") } - volume, err := o.ds.GetVolumeRO(snapshot.Spec.Volume) - if err != nil { - err := errors.Wrapf(err, "failed to get volume %v", snapshot.Spec.Volume) - return werror.NewInvalidError(err.Error(), "") - } - if volume.Spec.BackendStoreDriver == longhorn.BackendStoreDriverTypeV2 { - err := errors.Errorf("creating snapshot for volume %v with backend store driver %v is not supported", volume.Name, volume.Spec.BackendStoreDriver) - return werror.NewInvalidError(err.Error(), "") - } return nil }