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

odo dev on podman: Add support for devfile volume #6328

Conversation

feloy
Copy link
Contributor

@feloy feloy commented Nov 22, 2022

What type of PR is this:

/kind feature

What does this PR do / why we need it:

Which issue(s) this PR fixes:

Fixes #6330

PR acceptance criteria:

  • Unit test

  • Integration test

  • Documentation

How to test changes / Special notes to the reviewer:

@netlify
Copy link

netlify bot commented Nov 22, 2022

Deploy Preview for odo-docusaurus-preview canceled.

Name Link
🔨 Latest commit bfd25e2
🔍 Latest deploy log https://app.netlify.com/sites/odo-docusaurus-preview/deploys/637e0b5c508f3f0008283436

@openshift-ci openshift-ci bot added the kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation label Nov 22, 2022
@openshift-ci openshift-ci bot requested review from rm3l and valaparthvi November 22, 2022 08:55
@odo-robot
Copy link

odo-robot bot commented Nov 22, 2022

NoCluster Tests on commit df3e03d finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Nov 22, 2022

Unit Tests on commit df3e03d finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Nov 22, 2022

Validate Tests on commit df3e03d finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Nov 22, 2022

Windows Tests (OCP) on commit df3e03d finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Nov 22, 2022

Kubernetes Tests on commit df3e03d finished successfully.
View logs: TXT HTML

@odo-robot
Copy link

odo-robot bot commented Nov 22, 2022

OpenShift Tests on commit df3e03d finished successfully.
View logs: TXT HTML

@feloy feloy closed this Nov 23, 2022
@feloy feloy reopened this Nov 23, 2022
Name: devfileVolume.Name,
VolumeSource: corev1.VolumeSource{
PersistentVolumeClaim: &corev1.PersistentVolumeClaimVolumeSource{
ClaimName: getVolumeName(componentName, appName, devfileVolume.Name),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For cluster, we use a different naming strategy devfileVolume.Name+componentName+appName for volume components of Devfile. Perhaps we should use the same naming strategy for podman as well?

Copy link
Contributor Author

@feloy feloy Nov 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, I think I misunderstood the naming strategy on cluster. I have made chages, to change name for devfile volumes and also for the "shared" volume. WDYT?

@feloy feloy force-pushed the feature-6151/volumes-on-podman branch from 63daaed to 2c0af4d Compare November 23, 2022 10:33
pkg/dev/podmandev/pod.go Outdated Show resolved Hide resolved
pkg/dev/podmandev/pod.go Outdated Show resolved Hide resolved
pkg/dev/podmandev/pod.go Outdated Show resolved Hide resolved
pkg/dev/podmandev/pod.go Outdated Show resolved Hide resolved
@feloy feloy force-pushed the feature-6151/volumes-on-podman branch from f4a1e1d to bfd25e2 Compare November 23, 2022 12:00
@feloy feloy requested a review from valaparthvi November 23, 2022 12:16
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. Required by Prow. label Nov 23, 2022
@feloy feloy closed this Nov 23, 2022
@feloy feloy reopened this Nov 23, 2022
Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we shouldn't generate EmptyDir volumes when the Ephemeral preference is true, to be consistent with the cluster mode?
I just saw that Podman could support EmptyDir volumes by creating anonymous volumes (containers/podman#15473).
(But if you prefer, we can handle this in a separate issue/PR as well).

@feloy
Copy link
Contributor Author

feloy commented Nov 23, 2022

Wondering if we shouldn't generate EmptyDir volumes when the Ephemeral preference is true, to be consistent with the cluster mode? I just saw that Podman could support EmptyDir volumes by creating anonymous volumes (containers/podman#15473). (But if you prefer, we can handle this in a separate issue/PR as well).

Effectively, podman can handle emptyDir and PVC, and they are instantiated practically the same way: both are podman volumes, and emptyDir ones will be removed when pod is removed, as opposed to the PVC will be removed by odo at the same time the pod is removed.

I didn't want to add complexity for this small difference. But we can handle this in a separate PR is necessary

@feloy feloy closed this Nov 23, 2022
@feloy feloy reopened this Nov 23, 2022
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@rm3l rm3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we shouldn't generate EmptyDir volumes when the Ephemeral preference is true, to be consistent with the cluster mode? I just saw that Podman could support EmptyDir volumes by creating anonymous volumes (containers/podman#15473). (But if you prefer, we can handle this in a separate issue/PR as well).

Effectively, podman can handle emptyDir and PVC, and they are instantiated practically the same way: both are podman volumes, and emptyDir ones will be removed when pod is removed, as opposed to the PVC will be removed by odo at the same time the pod is removed.

I didn't want to add complexity for this small difference. But we can handle this in a separate PR is necessary

Okay, no problem. I've added a reminder note about this in the parent Epic.

/approve

@openshift-ci
Copy link

openshift-ci bot commented Nov 23, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rm3l

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. label Nov 23, 2022
@feloy
Copy link
Contributor Author

feloy commented Nov 23, 2022

/override ci/prow/v4.11-integration-e2e
Pass on IBM Cloud

@openshift-ci
Copy link

openshift-ci bot commented Nov 23, 2022

@feloy: Overrode contexts on behalf of feloy: ci/prow/v4.11-integration-e2e

In response to this:

/override ci/prow/v4.11-integration-e2e
Pass on IBM Cloud

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.

@openshift-merge-robot openshift-merge-robot merged commit 872d7ae into redhat-developer:main Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Required by Prow. kind/feature Categorizes issue as a feature request. For PRs, that means that the PR is the implementation lgtm Indicates that a PR is ready to be merged. Required by Prow.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support devfile volumes during dev on podman
4 participants