-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add support for ephemeral volumes #281
Conversation
@sleshchenko I might be seeing your issue from #269 (review) -- using |
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.
Tested and the described scenario works as expected, apart from fact that I needed to patch theia to be 7.26.0 which is know issue.
pkg/library/storage/testdata/error-unparseable-ephemeral-size.yaml
Outdated
Show resolved
Hide resolved
/test v5-devworkspaces-operator-e2e |
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.
Tested and working as expected 👍
From Serhii: DevWorkspace with spec:
started: true
template:
components:
- name: theia-next
plugin:
kubernetes:
name: theia-next
namespace: devworkspace-plugins
- name: machine-exec
plugin:
kubernetes:
name: machine-exec
namespace: devworkspace-plugins has PVC mounted but no finalizer set; looking into it. |
Add handling of volume components with ephemeral: true, which are propagated as emptyDir volumes without changing their name. Signed-off-by: Angel Misevski <[email protected]>
* Fix existing samples to use an ephemeral volume for the remote runtime injector * Add sample that uses emptyDir volumes for plugins and projects Signed-off-by: Angel Misevski <[email protected]>
Update pkg/library/storage/testdata/error-unparseable-ephemeral-size.yaml Co-authored-by: Serhii Leshchenko <[email protected]> Signed-off-by: Angel Misevski <[email protected]>
Fix the check for whether a finalizer is necessary to use the flattened workspace. Otherwise, we may miss some components that need storage (and so need to be finalized) if they are defined as plugins. Signed-off-by: Angel Misevski <[email protected]>
e12f781
to
26bfea9
Compare
/test v5-devworkspaces-operator-e2e |
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.
Still LGTM, additional thanks for handling the reported bug.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: amisevsk, JPinkney, sleshchenko 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 |
What does this PR do?
Adds support for volume components with
ephemeral: true
, which are provisioned as emptyDir volumes in the workspace pod.This PR updates the logic for determining whether a container needs storage. The new logic is:
mountSources: true
, we need storage unless there's an explicit projects volume withephemeral: true
this new check does not check that any container has mountSources as before, since that is covered by the first case, or an error (a container mounting a volume that is not defined)
I had to update the relevant test to support this change, and also added tests to cover the ephemeral volume use cases.
I've also added a sample that showcases some of the ways to use ephemeral volumes:
plugins
volume ephemeral)What issues does this PR fix or reference?
Closes devfile/api#310
Is it tested? How?
make install_plugin_templates
)I had a strange issue testing locally that I'm currently blaming minikube for: when I initially apply the sample, the volumes in the devworkspace are simply
but applying twice correctly shows the ephemeral field. No idea why that's happening and praying it doesn't reproduce elsewhere.