diff --git a/pkg/provision/storage/perWorkspaceStorage.go b/pkg/provision/storage/perWorkspaceStorage.go index 7b7c6fbf8..e59b81581 100644 --- a/pkg/provision/storage/perWorkspaceStorage.go +++ b/pkg/provision/storage/perWorkspaceStorage.go @@ -170,7 +170,7 @@ func getPVCSize(workspace *common.DevWorkspaceWithConfig, namespacedConfig *nsco if component.Volume.Size == "" { allVolumeSizesDefined = false - break + continue } volumeSize, err := resource.ParseQuantity(component.Volume.Size) diff --git a/pkg/provision/storage/testdata/perWorkspace-storage/uses-calculated-pvc-size-when-greater-than-default.yaml b/pkg/provision/storage/testdata/perWorkspace-storage/uses-calculated-pvc-size-when-greater-than-default.yaml index ca490c0d3..668f18579 100644 --- a/pkg/provision/storage/testdata/perWorkspace-storage/uses-calculated-pvc-size-when-greater-than-default.yaml +++ b/pkg/provision/storage/testdata/perWorkspace-storage/uses-calculated-pvc-size-when-greater-than-default.yaml @@ -1,4 +1,4 @@ -name: "Calculates PVC size when all volumes define their size" +name: "Calculates PVC size when sum of volumes with defined size is greater than default PVC size" input: devworkspaceId: "test-workspaceid" @@ -26,6 +26,8 @@ input: container: image: testing-image-1 sourceMapping: "/plugins-mountpath" + - name: plugins + volume: {} # Size is not defined, but calculated PVC size will be greater than default 5Gi so, calculated size should be used - name: volume-1 volume: size: 1Gi @@ -38,8 +40,6 @@ input: - name: volume-4 volume: size: 248Mi - - name: plugins - volume: {} # Size is not defined, but calculated PVC size will be greater than default 5Gi so, calculated size should be used output: pvcSize: 5880Mi