Commit d9cd7a78 authored by Victor Marmol's avatar Victor Marmol

Allow starting a container with --net=host.

parent 5eb37369
......@@ -1040,7 +1040,12 @@ func (kl *Kubelet) createPodInfraContainer(pod *api.Pod) (dockertools.DockerID,
if ref != nil {
kl.recorder.Eventf(ref, "pulled", "Successfully pulled image %q", container.Image)
}
id, err := kl.runContainer(pod, container, nil, "", "")
// TODO(vmarmol): Auth.
netNamespace := ""
if pod.Spec.HostNetwork {
netNamespace = "host"
}
id, err := kl.runContainer(pod, container, nil, netNamespace, "")
if err != nil {
return "", err
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment