diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-08-01 23:24:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-01 23:24:03 +0200 |
commit | 1bbcb2fc56c1655269930c83628ef5f5802f1887 (patch) | |
tree | 65f733604a864a6924302f204b5c374a27bd5dc4 /pkg/adapter/pods.go | |
parent | e1a099ed448312eb573c680561496f084aa71814 (diff) | |
parent | e7aca5568a057b99c6ca495a912dfd66b901fdcc (diff) | |
download | podman-1bbcb2fc56c1655269930c83628ef5f5802f1887.tar.gz podman-1bbcb2fc56c1655269930c83628ef5f5802f1887.tar.bz2 podman-1bbcb2fc56c1655269930c83628ef5f5802f1887.zip |
Merge pull request #3458 from rhatdan/volume
Use buildah/pkg/parse volume parsing rather then internal version
Diffstat (limited to 'pkg/adapter/pods.go')
-rw-r--r-- | pkg/adapter/pods.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/adapter/pods.go b/pkg/adapter/pods.go index b9d7fcd9b..2a52cfd0c 100644 --- a/pkg/adapter/pods.go +++ b/pkg/adapter/pods.go @@ -10,6 +10,7 @@ import ( "os" "strings" + "github.com/containers/buildah/pkg/parse" "github.com/containers/image/types" "github.com/containers/libpod/cmd/podman/cliconfig" "github.com/containers/libpod/cmd/podman/shared" @@ -570,7 +571,7 @@ func (r *LocalRuntime) PlayKubeYAML(ctx context.Context, c *cliconfig.KubePlayVa } } - if err := createconfig.ValidateVolumeHostDir(hostPath.Path); err != nil { + if err := parse.ValidateVolumeHostDir(hostPath.Path); err != nil { return nil, errors.Wrapf(err, "Error in parsing HostPath in YAML") } volumes[volume.Name] = hostPath.Path @@ -728,7 +729,7 @@ func kubeContainerToCreateConfig(ctx context.Context, containerYAML v1.Container if !exists { return nil, errors.Errorf("Volume mount %s specified for container but not configured in volumes", volume.Name) } - if err := createconfig.ValidateVolumeCtrDir(volume.MountPath); err != nil { + if err := parse.ValidateVolumeCtrDir(volume.MountPath); err != nil { return nil, errors.Wrapf(err, "error in parsing MountPath") } containerConfig.Volumes = append(containerConfig.Volumes, fmt.Sprintf("%s:%s", hostPath, volume.MountPath)) |