From ca9a455f2c6e488d2e2dcd37a6f0765551f27434 Mon Sep 17 00:00:00 2001 From: Paul Morie Date: Mon, 24 Oct 2016 18:42:19 -0400 Subject: [PATCH] Mark container hosts file for SELinux relabel --- pkg/kubelet/kubelet_pods.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/kubelet/kubelet_pods.go b/pkg/kubelet/kubelet_pods.go index d0c7d6068fa..7b2920fe7a6 100644 --- a/pkg/kubelet/kubelet_pods.go +++ b/pkg/kubelet/kubelet_pods.go @@ -133,10 +133,11 @@ func makeHostsMount(podDir, podIP, hostName, hostDomainName string) (*kubecontai return nil, err } return &kubecontainer.Mount{ - Name: "k8s-managed-etc-hosts", - ContainerPath: etcHostsPath, - HostPath: hostsFilePath, - ReadOnly: false, + Name: "k8s-managed-etc-hosts", + ContainerPath: etcHostsPath, + HostPath: hostsFilePath, + ReadOnly: false, + SELinuxRelabel: true, }, nil }