kube play should label the resources with similar labels than docker is using for compose
Feature request description
When running a compose project, we can inspect the containers and get the compose file used, and the context directory. (plus other informations)
This information is very valuable, as it allow to have more information on the source of the container(s).
Some of the labels compose is using are the following
{
"Labels": {
"com.docker.compose.config-hash": "<hash>",
"com.docker.compose.container-number": "1",
"com.docker.compose.oneoff": "False",
"com.docker.compose.project": "<project-name>",
"com.docker.compose.project.config_files": "<compose.yaml path>",
"com.docker.compose.project.working_dir": "<context-dir>",
[...]
}
}
Suggest potential solution
Similar to the compose labels. E.g. podman.kube.play: "" etc.
Have you considered any alternatives?
Manually annotate the pods.
The following is possible podman kube play --annotation=foo=bar but this is user dependant.
Additional context
For compose, having this information allow us in Podman Desktop (using the Podman Quadlet extension) to have some specific actions, like generating quadlet
We can provide this action because we are able to extract the compose file from the running resources, and use podlet to convert it and create a quadlet from it.
This is not a request from the Podman Desktop team, only me ;) . I am having a lot of fun developing podman-desktop/extension-podman-quadlet and I would like to be able to do something similar with the pods created from
podman kube play.
Thanks to https://github.com/podman-container-tools/podman/issues/26450 this issue might be easier to work on
/assign