From c5880dc701c9192f9f0ef997479abfc3c9d95b46 Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 3 Dec 2024 16:24:11 +0800 Subject: [PATCH] feat(crypto): unlimit v2 volume encrption from validator. ref: longhorn/longhorn 7355 Signed-off-by: James Lu --- webhook/resources/volume/validator.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webhook/resources/volume/validator.go b/webhook/resources/volume/validator.go index 31ab16f6b4..4ecfdfbe25 100644 --- a/webhook/resources/volume/validator.go +++ b/webhook/resources/volume/validator.go @@ -167,8 +167,10 @@ func (v *volumeValidator) Create(request *admission.Request, newObj runtime.Obje // TODO: remove this check when we support the following features for SPDK volumes if types.IsDataEngineV2(volume.Spec.DataEngine) { - if volume.Spec.Encrypted { - return werror.NewInvalidError("encrypted volume is not supported for data engine v2", "") + // if volume.Spec.Encrypted { + // return werror.NewInvalidError("encrypted volume is not supported for data engine v2", "") + if volume.Spec.BackingImage != "" { + return werror.NewInvalidError("backing image is not supported for data engine v2", "") } if types.IsDataFromVolume(volume.Spec.DataSource) { return werror.NewInvalidError("clone is not supported for data engine v2", "")