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 emptyDir volume support to kube play #15473

Merged
merged 1 commit into from
Aug 31, 2022

Conversation

umohnani8
Copy link
Member

When a kube yaml has a volume set as empty dir, podman
will create an anonymous volume with the empty dir name and
attach it to the containers running in the pod. When the pod
is removed, the empy dir volume created is also removed.

Add tests and docs for this as well.

Fixes #13309

Signed-off-by: Urvashi Mohnani [email protected]

Does this PR introduce a user-facing change?

Add support for emptyDir volumes to podman kube play.

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 25, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: umohnani8

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. label Aug 25, 2022
libpod/container.go Outdated Show resolved Hide resolved
@umohnani8
Copy link
Member Author

Any idea why govet is complaining when I haven't touched the code there https://github.com/containers/podman/pull/15473/checks?check_run_id=8021235120

@mheon
Copy link
Member

mheon commented Aug 25, 2022

Maybe the version of the linter we use updated? Not sure

@umohnani8
Copy link
Member Author

@cevich any idea what I am doing wrong here. I have rebased with upstream main so don't think I should be missing any linter updates

@cevich
Copy link
Member

cevich commented Aug 25, 2022

I have rebased with upstream main so don't think I should be missing any linter updates

Unfortunately no, I'm not sure :( According to https://cirrus-ci.com/github/containers/podman/main problem isn't a problem that's crept into `main'. So it must be something specific to changes in this PR.

@rhatdan
Copy link
Member

rhatdan commented Aug 26, 2022

See if adding this patch fixes it.
lint.patch

@umohnani8 umohnani8 force-pushed the empty-dir branch 4 times, most recently from 0837769 to 6c34c09 Compare August 29, 2022 15:28
When a kube yaml has a volume set as empty dir, podman
will create an anonymous volume with the empty dir name and
attach it to the containers running in the pod. When the pod
is removed, the empy dir volume created is also removed.

Add tests and docs for this as well.

Signed-off-by: Urvashi Mohnani <[email protected]>
@rhatdan
Copy link
Member

rhatdan commented Aug 31, 2022

Should an emptyDir be destroyed when you podman kube down?

@mheon
Copy link
Member

mheon commented Aug 31, 2022

That should be automatically handled by the anonymous volumes - they autoremove when the last container using them is removed

@mheon
Copy link
Member

mheon commented Aug 31, 2022

LGTM

@rhatdan
Copy link
Member

rhatdan commented Aug 31, 2022

/lgtm
Thanks @mheon I did not know that.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 31, 2022
@openshift-merge-robot openshift-merge-robot merged commit 8266dbe into containers:main Aug 31, 2022
@umohnani8 umohnani8 deleted the empty-dir branch February 23, 2023 18:44
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 8, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

To implement volume.emptyDir in Kubernetes config for the "play kube" command
6 participants