-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat: 'one PVC per-workspace' storage class #818
Conversation
Hi @AObuchow. Thanks for your PR. I'm waiting for a devfile member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass at review -- generally looks good!
I'll get around to deeper review and testing later.
8810b3f
to
54e9f04
Compare
53c8e9b
to
51e660b
Compare
51e660b
to
ba4c27b
Compare
ba4c27b
to
b2ee4e4
Compare
b2ee4e4
to
8d65602
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly just minor nitpicks and polish at this point. Well done!
Tested on OpenShift 4.10 and works as expected 👍
8d65602
to
dd4baca
Compare
Awesome, thank you so much for the help & reviews @amisevsk 😁 |
Well done 👍 |
@@ -90,6 +90,10 @@ func PVCCleanupJobName(workspaceId string) string { | |||
return fmt.Sprintf("cleanup-%s", workspaceId) | |||
} | |||
|
|||
func PerWorkspacePVCName(workspaceId string) string { | |||
return fmt.Sprintf("storage-%s", workspaceId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Sprintf("storage-%s", workspaceId) | |
return fmt.Sprintf("claim-%s", workspaceId) |
// TODO: Determine the storage size that is needed by iterating through workspace volumes, | ||
// adding the sizes specified and figuring out overrides/defaults |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This TODO is planned to be addressed as part of #740, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, or at the least, it might end up being a separate but related issue
dd4baca
to
15b6705
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job 👍
Fix devfile#792. Signed-off-by: Andrew Obuchowicz <[email protected]>
15b6705
to
7b89ee5
Compare
/test v8-devworkspace-operator-e2e, v8-che-happy-path |
/retest |
@AObuchow: Cannot trigger testing until a trusted user reviews the PR and leaves an In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/retest |
I believe we can merge with the failed test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We generally treat happy path as optional; the QE folks have had their plate full with other projects and its been unhealthy for a while now.
👍 to merge
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: amisevsk, AObuchow, ibuziuk The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
@AObuchow: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
What does this PR do?
This PR adds a new storage class called 'perWorkspace'. When in use in the devfile, every workspace gets its own PVC.
What issues does this PR fix or reference?
Fix #792
Is it tested? How?
In order to enable the 'perWorkspace' storage class, the
controller.devfile.io/storage-type
devfile attribute must be set toper-workspace
.Eg.
Manual testing:
make run
)kubectl apply -f ./samples/theia-next_per-workspaceStorage.yaml -n $NAMESPACE
storage-[workspaceID]
kubectl delete dw theia-next -n $NAMESPACE
Automated testing:
There is also a new test file,
pkg/provision/storage/perWorkspaceStorage_test.go
.It is based off of
pkg/provision/storage/CommonStorage_test.go
with slight adaptions. It also ensures that the owner reference is set for the perWorkspace PVC, which is required for automatic PVC deletion with cluster garbage collection.PR Checklist
/test v8-devworkspace-operator-e2e, v8-che-happy-path
to trigger)v8-devworkspace-operator-e2e
: DevWorkspace e2e testv8-che-happy-path
: Happy path for verification integration with Che