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

Add support for ephemeral volumes. #5131

Closed
kadel opened this issue Oct 8, 2021 · 5 comments · Fixed by #5279
Closed

Add support for ephemeral volumes. #5131

kadel opened this issue Oct 8, 2021 · 5 comments · Fixed by #5279
Assignees
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).

Comments

@kadel
Copy link
Member

kadel commented Oct 8, 2021

Devfile 2.1.0 introduced new field in volume components called ephemeral

When ephemeral: true the volume should be always created as emptyDir

- name: volume-test
  volume:
    size: 1Gi
    ephemeral: true

/kind feature
/area devfile
/priority high

@kadel kadel changed the title Extend Volume components to support more features (issue 310) - Devfiles containing persistent and external types must work. Add support for ephemeral volumes. Oct 8, 2021
@kadel kadel added area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). labels Oct 8, 2021
@kadel
Copy link
Member Author

kadel commented Oct 8, 2021

/status blocked
missing support for ephemeral in devfile/libary
devfile/api#642

@kadel
Copy link
Member Author

kadel commented Nov 1, 2021

devfile/api#642

fixed

/remove-status blocked

@valaparthvi valaparthvi added the triage/needs-information Indicates an issue needs more information in order to work on it. label Nov 8, 2021
@valaparthvi valaparthvi self-assigned this Nov 8, 2021
@valaparthvi valaparthvi added priority/Medium Nice to have issue. Getting it done before priority changes would be great. and removed priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). labels Nov 8, 2021
@valaparthvi
Copy link
Contributor

valaparthvi commented Nov 10, 2021

odo has ephemeral setting, which when set to true, uses emptyDir{} for volume.
With the new volume.ephemeral field, if it is set to true, emptyDir{} should be used to create volumes.
Devfile should get a preference, so even if ephemeral is set to false, devfile should get a preference. The default value for volume.ephemeral is set to false.

We do not remove odo's ephemeral setting as of now because it is required for odo-project volume where we store the source code.

To reproduce this issue, create a java-maven component, change the apiVersion to 2.1.0 and add ephemeral: true to the m2 volume.
Mainly would require updating the [createOrUpdateComponent](https://github.com/openshift/odo/blob/main/pkg/devfile/adapters/kubernetes/component/adapter.go#L427) method.

Acceptance Criteria:

  • if volume.ephemeral is set to true; create an emptyDir{} volume
  • if volume.ephemeral is set to false(default); create PVC, it should work like it does now
  • Integration test
  • Unit test
  • Add klog wherever necessary.

@dharmit dharmit added points/3 and removed triage/needs-information Indicates an issue needs more information in order to work on it. labels Nov 10, 2021
@dharmit dharmit added priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)). and removed priority/Medium Nice to have issue. Getting it done before priority changes would be great. labels Nov 18, 2021
@feloy
Copy link
Contributor

feloy commented Dec 3, 2021

Do we want to add a flag --ephemeral=true/false to the odo storage create command as part of this PR?

@kadel
Copy link
Member Author

kadel commented Dec 3, 2021

Do we want to add a flag --ephemeral=true/false to the odo storage create command as part of this PR?

this is good idea 👍 . We should do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devfile-spec Issues or PRs related to the Devfile specification and how odo handles and interprets it. priority/High Important issue; should be worked on before any other issues (except priority/Critical issue(s)).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants