summaryrefslogtreecommitdiff
path: root/libpod/kube.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-05-21 13:52:55 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-05-21 13:52:55 -0400
commit03824e04fdcc4a4f72741db9aa0962ecedf78ac3 (patch)
tree32c78d2f52bbae8c8beeea4ed40a0643939628d4 /libpod/kube.go
parent773b9ac9d059a66280ac50163a17bc705bde0a60 (diff)
downloadpodman-03824e04fdcc4a4f72741db9aa0962ecedf78ac3.tar.gz
podman-03824e04fdcc4a4f72741db9aa0962ecedf78ac3.tar.bz2
podman-03824e04fdcc4a4f72741db9aa0962ecedf78ac3.zip
Fix a 'generate kube' bug on ctrs with named volumes
Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/kube.go')
-rw-r--r--libpod/kube.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/libpod/kube.go b/libpod/kube.go
index 260269b2e..149ea50c8 100644
--- a/libpod/kube.go
+++ b/libpod/kube.go
@@ -220,12 +220,12 @@ func containerToV1Container(c *Container) (v1.Container, error) {
return kubeContainer, err
}
kubeContainer.VolumeMounts = volumes
- return kubeContainer, errors.Wrapf(ErrNotImplemented, "volume names")
+ //return kubeContainer, errors.Wrapf(ErrNotImplemented, "volume names")
}
envVariables, err := libpodEnvVarsToKubeEnvVars(c.config.Spec.Process.Env)
if err != nil {
- return kubeContainer, nil
+ return kubeContainer, err
}
portmappings, err := c.PortMappings()
@@ -234,7 +234,7 @@ func containerToV1Container(c *Container) (v1.Container, error) {
}
ports, err := ocicniPortMappingToContainerPort(portmappings)
if err != nil {
- return kubeContainer, nil
+ return kubeContainer, err
}
containerCommands := c.Command()
@@ -345,7 +345,7 @@ func libpodMountsToKubeVolumeMounts(c *Container) ([]v1.VolumeMount, error) {
for _, hostSourcePath := range c.config.UserVolumes {
vm, err := generateKubeVolumeMount(hostSourcePath, c.config.Spec.Mounts)
if err != nil {
- return vms, err
+ continue
}
vms = append(vms, vm)
}