summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-31 09:37:35 -0400
committerGitHub <noreply@github.com>2020-08-31 09:37:35 -0400
commit24a335b0aeedfb04dea5b0d498b5984458f73779 (patch)
tree1e457ffb7db75b65d9159e0a8e0a03f1ae251b92 /pkg
parent575b3a3d8ab4f1f72d58b71aa4d534eca3a5d8f9 (diff)
parent83531904da6e3fbf1593ca3c77b14058e8707a58 (diff)
downloadpodman-24a335b0aeedfb04dea5b0d498b5984458f73779.tar.gz
podman-24a335b0aeedfb04dea5b0d498b5984458f73779.tar.bz2
podman-24a335b0aeedfb04dea5b0d498b5984458f73779.zip
Merge pull request #7494 from haircommander/play-kube-socket
play kube: handle Socket HostPath type
Diffstat (limited to 'pkg')
-rw-r--r--pkg/domain/infra/abi/play.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/play.go b/pkg/domain/infra/abi/play.go
index 4ebc37cda..729cd143c 100644
--- a/pkg/domain/infra/abi/play.go
+++ b/pkg/domain/infra/abi/play.go
@@ -250,13 +250,22 @@ func (ic *ContainerEngine) playKubePod(ctx context.Context, podName string, podY
if err := libpod.LabelVolumePath(hostPath.Path); err != nil {
return nil, errors.Wrapf(err, "Error giving %s a label", hostPath.Path)
}
+ case v1.HostPathSocket:
+ st, err := os.Stat(hostPath.Path)
+ if err != nil {
+ return nil, errors.Wrapf(err, "Error checking HostPathSocket")
+ }
+ if st.Mode()&os.ModeSocket != os.ModeSocket {
+ return nil, errors.Errorf("Error checking HostPathSocket: path %s is not a socket", hostPath.Path)
+ }
+
case v1.HostPathDirectory:
case v1.HostPathFile:
case v1.HostPathUnset:
// do nothing here because we will verify the path exists in validateVolumeHostDir
break
default:
- return nil, errors.Errorf("Directories are the only supported HostPath type")
+ return nil, errors.Errorf("Invalid HostPath type %v", hostPath.Type)
}
}