Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't abort PVC size calculation early if volume size not defined #1163

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/provision/storage/perWorkspaceStorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading