-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Only one SOURCE-VOLUME is supported by bind-mount-options in generated Kubernetes YAML files #17761
Comments
A friendly reminder that this issue had no activity for 30 days. |
@ygalblum @umohnani8 PTAL |
The root cause here is that Podman uses a single annotation key As a result, But, this issue doesn't end there. When parsing the annotations, So, as I see it, the issue should be fixed by changing the value of the Once |
A friendly reminder that this issue had no activity for 30 days. |
@ygalblum Interested in opening a PR to support this change? |
I've played with my proposal and found that it is not a good solution. The reason is that the length of the value of an annotation is limited to 63 characters. As a result, once I had two paths each longer than 29 characters, I was already above the limit (add I then though about building separate annotation keys for each case. But, ended up with the same issue. The maximum length for the name part of the annotation key is again 63 (https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) while the maximal path length on Linux is 4096. This made me realize that the current solution (regardless to this issue) needs to be reevaluated. I would like, however, to discuss the issue at hand. First, comes the question of what is the purpose of If the output is to be used on K8S, then AFAIK But, if the output is to be used on Podman (with or without using on K8S), then as I wrote before, we need to first figure out the solution for @rhatdan @umohnani8 @vrothberg WDYT? |
If I'm not missing something, volumeMounts:
- mountPath: /mounted-path:z
name: vol-name So the annotation is completely unnecessary and can be safely removed. |
This is still happening in version 5.2.2 |
@quaintdev please see @K1DV5's answer: #17761 (comment) |
This works. Thanks. |
Issue Description
Only one SOURCE-VOLUME gets referenced within the
bind-mount-options
entry in the Kubernetes YAML files generated usingpodman kube generate
, even though there might be several more defined for the individual containers within the pod.Looking at the code, this seems to be by design. However I think this behaviour might worth a short explanation in the documentation at least, as it might not be obvious for all users.
Steps to reproduce the issue
podman kube generate example
Describe the results you received
The
metadata
section looks like:Describe the results you expected
/tmp/ex_1:Z
/tmp/ex_2:Z
should have appeared somewhere as well.
bind-mount-options
metadata pertaining to these mounts seems to be lost.podman info output
N/A
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: