summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-03-29 05:47:02 -0700
committerGitHub <noreply@github.com>2019-03-29 05:47:02 -0700
commit9b789359f17f22bdd2ed49087c23eebf39f338f3 (patch)
tree4ccdf7b1acd720ea0b0c4c92804afd63d9bd5b1f /cmd
parent376a89c7a417e90bc667e11f7264e4a7ea950bfe (diff)
parent0d0ad59641a308450d694d4c2fb95303c64fabf8 (diff)
downloadpodman-9b789359f17f22bdd2ed49087c23eebf39f338f3.tar.gz
podman-9b789359f17f22bdd2ed49087c23eebf39f338f3.tar.bz2
podman-9b789359f17f22bdd2ed49087c23eebf39f338f3.zip
Merge pull request #2575 from haircommander/hotfix_play_kube
Default to SELinux private label for play kube mounts
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/play_kube.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmd/podman/play_kube.go b/cmd/podman/play_kube.go
index 10221a339..0429a40eb 100644
--- a/cmd/podman/play_kube.go
+++ b/cmd/podman/play_kube.go
@@ -168,7 +168,13 @@ func playKubeYAMLCmd(c *cliconfig.KubePlayValues) error {
return errors.Errorf("Error creating HostPath %s at %s", volume.Name, hostPath.Path)
}
}
+ // unconditionally label a newly created volume as private
+ if err := libpod.LabelVolumePath(hostPath.Path, false); err != nil {
+ return errors.Wrapf(err, "Error giving %s a label", hostPath.Path)
+ }
+ break
case v1.HostPathDirectory:
+ case v1.HostPathUnset:
// do nothing here because we will verify the path exists in validateVolumeHostDir
break
default:
@@ -178,7 +184,6 @@ func playKubeYAMLCmd(c *cliconfig.KubePlayValues) error {
if err := shared.ValidateVolumeHostDir(hostPath.Path); err != nil {
return errors.Wrapf(err, "Error in parsing HostPath in YAML")
}
- fmt.Println(volume.Name)
volumes[volume.Name] = hostPath.Path
}