-
Notifications
You must be signed in to change notification settings - Fork 72
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: Deleting the common PVC if there are no workspaces left for a given user #16
Conversation
…r a given user Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
…e users ('workspaceNamespaceDefault' without placeholders is defined) Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
Can one of the admins verify this patch? |
@amisevsk @ibuziuk I had trouble reproducing this possible corner case: eclipse-che/che#18713 (review). For the common strategy, I delete the Go workspace, and immediately create a Java Maven workspace, I don't seem to experience any blocking due to PVC deletion: |
...ava/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/CommonPVCStrategy.java
Show resolved
Hide resolved
...ava/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/CommonPVCStrategy.java
Outdated
Show resolved
Hide resolved
...ava/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/CommonPVCStrategy.java
Outdated
Show resolved
Hide resolved
...g/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/PerWorkspacePVCStrategy.java
Outdated
Show resolved
Hide resolved
...org/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/CommonPVCStrategyTest.java
Outdated
Show resolved
Hide resolved
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.
@dkwon17 could you please follow the brand new semantic PR requirment https://github.com/zeke/semantic-pull-requests
Signed-off-by: David Kwon <dakwon@redhat.com>
...org/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/CommonPVCStrategyTest.java
Outdated
Show resolved
Hide resolved
...ava/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/CommonPVCStrategy.java
Outdated
Show resolved
Hide resolved
...ava/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/CommonPVCStrategy.java
Outdated
Show resolved
Hide resolved
Signed-off-by: David Kwon <dakwon@redhat.com>
Signed-off-by: David Kwon <dakwon@redhat.com>
Signed-off-by: David Kwon <dakwon@redhat.com>
...org/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/CommonPVCStrategyTest.java
Outdated
Show resolved
Hide resolved
[crw-ci-test --rebuild] |
...ava/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/CommonPVCStrategy.java
Outdated
Show resolved
Hide resolved
...org/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/CommonPVCStrategyTest.java
Outdated
Show resolved
Hide resolved
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.
LGTM, assuming that formatting is fixed (mvn fmt:format
should be run according to the PR check) + the non-relevant test is removed #16 (comment)
@dkwon17 please also provide a relevant PR to docs with a new feature description. Smth. like:
NOTE: the common PVC will be removed once all user's workspaces are deleted. PVC will be re-created once a new non-ephemeral workspace is started.
https://www.eclipse.org/che/docs/che-7/installation-guide/configuring-storage-strategies/
Signed-off-by: David Kwon <dakwon@redhat.com>
...ava/org/eclipse/che/workspace/infrastructure/kubernetes/namespace/pvc/CommonPVCStrategy.java
Outdated
Show resolved
Hide resolved
Signed-off-by: David Kwon <dakwon@redhat.com>
Signed-off-by: David Kwon <dakwon@redhat.com>
[crw-ci-test --rebuild] |
❌ E2E Happy path tests failed ❗ See Details
Tested with Eclipse Che on K8S (minikube v1.1.1)
Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe |
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 contribution, thanks
[crw-ci-test --rebuild] |
❌ E2E Happy path tests failed ❗ See Details
Tested with Eclipse Che on K8S (minikube v1.1.1)
Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe |
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.
Looks great, thank you!
[crw-ci-test --rebuild] |
✅ E2E Happy path tests succeed 🎉 See Details
Tested with Eclipse Che on K8S (minikube v1.1.1)
Eclipse Che QE channel: https://mattermost.eclipse.org/eclipse/channels/eclipse-che-qe |
Thanks a lot, everyone. Is now a good time for me to squash all commits into one? |
Unless there's a compelling reason to show the commit history, I always use 'squash and merge' to apply PRs. Sometimes I'll manually rebase a bunch of commits from, say, 12 commits down to 2 or 3 (if the PR covers more than one interesting change) and then NOT squash-merge... but that's the exception. TL;DR, I'd say yes, squash away! |
What does this PR do?
Deletes the common PVC if there are no workspaces left for a given user. This PR copies over the three commits from this PR: eclipse-che/che#18713.
Screenshot/screencast of this PR
After the three workspaces are deleted, the common PVC is deleted.
PVCs are also deleted when
![che-18369_2](https://user-images.githubusercontent.com/83611742/119894683-e8b9c900-bf0a-11eb-8a3a-31265bafa7be.gif)
pvcStrategy
is set toper-workspace
:If
pvcStrategy
is set toper-workspace
, after a workspace is deleted, the corresponding PVC is deleted.What issues does this PR fix or reference?
eclipse-che/che#18369
How to test this PR?
The image:
quay.io/dkwon17/che-server:che-18369
Testing with helm installer:
Testing with operator installer:
When Che is deployed with the operator, we need this PR to provide delete permissions for the Che service account: eclipse-che/che-operator#847.
My
che-operator
image for that PR is:quay.io/dkwon17/che-operator:19867
.PR Checklist
As the author of this Pull Request I made sure that:
What issues does this PR fix or reference
andHow to test this PR
completedReviewers
Reviewers, please comment how you tested the PR when approving it.