mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Merge pull request #453 from brendandburns/memory
Add support for memory limits in the kubelet.
This commit is contained in:
commit
07fafb1252
@ -391,13 +391,14 @@ func (kl *Kubelet) runContainer(manifest *api.ContainerManifest, container *api.
|
|||||||
opts := docker.CreateContainerOptions{
|
opts := docker.CreateContainerOptions{
|
||||||
Name: buildDockerName(manifest, container),
|
Name: buildDockerName(manifest, container),
|
||||||
Config: &docker.Config{
|
Config: &docker.Config{
|
||||||
|
Cmd: container.Command,
|
||||||
|
Env: envVariables,
|
||||||
|
ExposedPorts: exposedPorts,
|
||||||
Hostname: container.Name,
|
Hostname: container.Name,
|
||||||
Image: container.Image,
|
Image: container.Image,
|
||||||
ExposedPorts: exposedPorts,
|
Memory: int64(container.Memory),
|
||||||
Env: envVariables,
|
|
||||||
Volumes: volumes,
|
Volumes: volumes,
|
||||||
WorkingDir: container.WorkingDir,
|
WorkingDir: container.WorkingDir,
|
||||||
Cmd: container.Command,
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
dockerContainer, err := kl.DockerClient.CreateContainer(opts)
|
dockerContainer, err := kl.DockerClient.CreateContainer(opts)
|
||||||
|
Loading…
Reference in New Issue
Block a user