From df2d9548ae7a1ac2756c2dff63e4483229774645 Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Wed, 1 Sep 2021 12:00:12 +0530 Subject: [PATCH] cephfs: no need to check for zero volume size At present there is a 'todo' to check for zero volume size in the createVolume request which in unwanted, ie the pvc creation with size 0 fail from the kubernetes api validation itself: For ex: ``` ..spec.resources[storage]: Invalid value: "0": must be greater than zero``` ``` so we dont need any extra check in the controller server Signed-off-by: Humble Chirammal --- internal/cephfs/controllerserver.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/cephfs/controllerserver.go b/internal/cephfs/controllerserver.go index a80eb122a..6d32837f7 100644 --- a/internal/cephfs/controllerserver.go +++ b/internal/cephfs/controllerserver.go @@ -188,7 +188,6 @@ func (cs *ControllerServer) CreateVolume( if req.GetCapacityRange() != nil { volOptions.Size = util.RoundOffBytes(req.GetCapacityRange().GetRequiredBytes()) } - // TODO need to add check for 0 volume size parentVol, pvID, sID, err := checkContentSource(ctx, req, cr) if err != nil {