mirror of https://github.com/k3s-io/k3s
Allow starting a container with --net=host.
parent
5eb373692b
commit
d9cd7a78f7
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue