diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-05-22 09:47:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-22 09:47:44 +0200 |
commit | a4c42c6c6c8a70a0123c4bb4c5b7aad4096c8dfa (patch) | |
tree | ba3685512bba6f8c5db2badac7c40927b6fbf5db /libpod | |
parent | 6f02f3b2bc58925bfb8c97c897f58473f09e1219 (diff) | |
parent | 968bcbc86b8fa26383ae2d4809b04aac288355f0 (diff) | |
download | podman-a4c42c6c6c8a70a0123c4bb4c5b7aad4096c8dfa.tar.gz podman-a4c42c6c6c8a70a0123c4bb4c5b7aad4096c8dfa.tar.bz2 podman-a4c42c6c6c8a70a0123c4bb4c5b7aad4096c8dfa.zip |
Merge pull request #3178 from mheon/fix_gen_kube
Fix a 'generate kube' bug on ctrs with named volumes
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/kube.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libpod/kube.go b/libpod/kube.go index 260269b2e..c5fd9d75c 100644 --- a/libpod/kube.go +++ b/libpod/kube.go @@ -220,12 +220,11 @@ func containerToV1Container(c *Container) (v1.Container, error) { return kubeContainer, err } kubeContainer.VolumeMounts = volumes - 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 +233,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 +344,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) } |