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

To implement volume.emptyDir in Kubernetes config for the "play kube" command #13309

Closed
ratermir opened this issue Feb 22, 2022 · 18 comments · Fixed by #15473
Closed

To implement volume.emptyDir in Kubernetes config for the "play kube" command #13309

ratermir opened this issue Feb 22, 2022 · 18 comments · Fixed by #15473
Assignees
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. kind/feature Categorizes issue or PR as related to a new feature. kube locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@ratermir
Copy link

ratermir commented Feb 22, 2022

FEATURE REQUEST

It looks like Podman Currenty supports only host mounted volumes in kubernetes deployment yaml. If I try to define something like this:

      volumes:
        - name: temp-vol-shared
          emptyDir: {}

I get message that only hostPath is currently supported.

It would be really helpful tu support this, especially with "in-memory" storage.

I use OpenSuSE Leap, where the latest podman version is 2.2, but I didn't find this feature in release notes for all 3.x releases, so I suppose it still is not implemented.

@mheon mheon added the kind/feature Categorizes issue or PR as related to a new feature. label Feb 22, 2022
@rhatdan
Copy link
Member

rhatdan commented Feb 22, 2022

@umohnani8 @haircommander What is an emtryDir volume from a Podman perspective

@ratermir
Copy link
Author

ratermir commented Feb 22, 2022

Normal Kubernetes "emptyDir" is a directory, which is initially (after the POD starts) empty, can be mounted into containers like normal volume, and is destroyed after the POD stops. Its goal is data exchange among containers inside the POD, and temporary storage, where we needn't care about its cleaning.

I thing there is no exact equivalent in Podman, it can be something like temporary volume or so (i.e. create volume somewhere inside POD's filesystem space), and delete it after POD ends. I don't know Podman "guts" to tell how complicate it would be.

Additional option to emptyDir is "in memory volume" - it is an additional configuration item under emptyDir K8S YAML config, which tells that the temporary volume is created in memory; the rest is the same as before..

Generally it is really useful for data exchange among containers inside the POD and widely used in Kubernetes deployments. Even if it can be replaced with temporary directory mounted into POD (from local filesystem) and shell script which deletes it after POD stops, it is more complicated and far less comfortable.

@rhatdan
Copy link
Member

rhatdan commented Feb 22, 2022

We could do something with an overlay mount for a large temporary file system,
And a tmpfs for a one in memory.

@umohnani8 PTAL

@rhatdan
Copy link
Member

rhatdan commented Feb 22, 2022

@ratermir Interested in opening a PR for this.
We are already doing something like this with /dev/shm.

@ratermir
Copy link
Author

Is there anything I can do for it? Note that I am not a go developer, but Kubernetes user.

@rhatdan
Copy link
Member

rhatdan commented Feb 22, 2022

No problem, I am sure someone will pick this up, since it seems like a fun project.

@rhatdan rhatdan added the Good First Issue This issue would be a good issue for a first time contributor to undertake. label Feb 22, 2022
@rhatdan rhatdan added the kube label Mar 7, 2022
@github-actions
Copy link

github-actions bot commented Apr 7, 2022

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Apr 7, 2022

@umohnani8 were you able to look at this?

@github-actions
Copy link

github-actions bot commented May 8, 2022

A friendly reminder that this issue had no activity for 30 days.

@Sadin
Copy link

Sadin commented May 31, 2022

Is this still on the table? Would like to take a stab at it and start helping podman

@mheon
Copy link
Member

mheon commented May 31, 2022

Feel free to take a stab at it!

@Sadin
Copy link

Sadin commented May 31, 2022

Got my dev environment setup, reading up on

https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
https://www.kernel.org/doc/html/latest/filesystems/tmpfs.html

Where might I find more information on how podman is already using /dev/shm?

@1player
Copy link

1player commented Jun 30, 2022

Any update?

@rhatdan
Copy link
Member

rhatdan commented Jun 30, 2022

@ashley-cui @umohnani8 @mheon @vrothberg can we get an intern to work on this, or someone else take it.

@vrothberg
Copy link
Member

@ashley-cui @umohnani8 @mheon @vrothberg can we get an intern to work on this, or someone else take it.

I suggest moving Kube-related issues up the priority list as discussed yesterday during planning. Probably worth creating an epic for it.

@github-actions
Copy link

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Jul 31, 2022

@umohnani8 any progress on this?

@umohnani8
Copy link
Member

yup on it, will have a PR this week.

@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 17, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Good First Issue This issue would be a good issue for a first time contributor to undertake. kind/feature Categorizes issue or PR as related to a new feature. kube locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants