-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
unable to find mount source when generating kube yaml being rootless #2963
Comments
Aftrer digging into source code, it looks like the source and destination of volume mounts is mixed in kube.go. I could fix it by doing this: @@ -342,8 +340,8 @@ func libpodMountsToKubeVolumeMounts(c *Container) ([]v1.VolumeMount, error) {
// At this point, I dont think we can distinguish between the default
// volume mounts and user added ones. For now, we pass them all.
var vms []v1.VolumeMount
- for _, hostSourcePath := range c.config.UserVolumes {
- vm, err := generateKubeVolumeMount(hostSourcePath, c.config.Spec.Mounts)
+ for _, mount := range c.config.Spec.Mounts {
+ vm, err := generateKubeVolumeMount(mount.Source, c.config.Spec.Mounts)
if err != nil {
return vms, err
} But then I receive another error: /cc @baude according to git history you worked on kube.go most? |
@haircommander PTAL |
I was able to reproduce this using only commands from the RH blog about pod / kube interop:
This was on |
I think this would be my rework of named volumes in 1.3 - one or more of those containers probably has an image volume, and it seems I missed this bit of code when I migrated image volumes out of the Libpod spec. For now, it's probably sufficient to take https://github.com/containers/libpod/blob/master/libpod/kube.go#L337 and make it not return an error (or silently discard said error) - Libpod named volumes aren't really Kube hostpath volumes, and we haven't convinced |
/kind bug
Version
Podman 1.3.0-dev
OS
Fedora Workstation 29, Linux linux.fritz.box 5.0.4-200.fc29.x86_64 #1 SMP Mon Mar 25 02:27:33 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
How to reproduce
Note that probably not all ports are needed or even matter. But I still provide full commands I executed:
The text was updated successfully, but these errors were encountered: