Merge pull request #539 from vmarmol/pause

Add a pause image for the net container.
This commit is contained in:
Daniel Smith
2014-07-21 15:47:39 -07:00
7 changed files with 114 additions and 6 deletions

View File

@@ -541,7 +541,10 @@ func (kl *Kubelet) WatchEtcd(watchChannel <-chan *etcd.Response, updateChannel c
}
}
const networkContainerName = "net"
const (
networkContainerName = "net"
networkContainerImage = "kubernetes/pause:latest"
)
// Create a network container for a manifest. Returns the docker container ID of the newly created container.
func (kl *Kubelet) createNetworkContainer(manifest *api.ContainerManifest) (DockerID, error) {
@@ -552,12 +555,11 @@ func (kl *Kubelet) createNetworkContainer(manifest *api.ContainerManifest) (Dock
ports = append(ports, container.Ports...)
}
container := &api.Container{
Name: networkContainerName,
Image: "busybox",
Command: []string{"sh", "-c", "rm -f nap && mkfifo nap && exec cat nap"},
Ports: ports,
Name: networkContainerName,
Image: networkContainerImage,
Ports: ports,
}
kl.DockerPuller.Pull("busybox")
kl.DockerPuller.Pull(networkContainerImage)
return kl.runContainer(manifest, container, nil, "")
}