From 8897c0ba06e882d7b591ae37a32899725fcf86c4 Mon Sep 17 00:00:00 2001 From: Shelly Kagan Date: Mon, 28 Oct 2024 19:44:55 +0200 Subject: [PATCH] webhooks/datavolume: comment about remove check of claim adoption (#3481) There is an open issue in github to remove the claim adoption feature gate: https://github.com/kubevirt/containerized-data-importer/issues/3480 Once the FG is removed we should remove the check in the webhook that verifies if it allowed to have an existing PVC. Signed-off-by: Shelly Kagan --- pkg/apiserver/webhooks/datavolume-validate.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/apiserver/webhooks/datavolume-validate.go b/pkg/apiserver/webhooks/datavolume-validate.go index 5456d4b09b..ed031f26de 100644 --- a/pkg/apiserver/webhooks/datavolume-validate.go +++ b/pkg/apiserver/webhooks/datavolume-validate.go @@ -492,6 +492,9 @@ func (wh *dataVolumeValidatingWebhook) Admit(ar admissionv1.AdmissionReview) *ad return toAdmissionResponseError(err) } } else { + // We are planning to remove the Claim adoption feature gate + // https://github.com/kubevirt/containerized-data-importer/issues/3480 + // once removed we should remove the check for it in this webhook. allow, err := cc.ClaimMayExistBeforeDataVolume(wh.controllerRuntimeClient, pvc, &dv) if err != nil { return toAdmissionResponseError(err)