Merge pull request #24630 from euank/redundant-created

Automatic merge from submit-queue

kubelet: Remove redundant `Container.Created`

As far as I can tell, this has been supplanted by a) the `DockerJSON.CreatedAt` field and b) the
`ContainerStatus.CreatedAt`, where the first is used for creating the
second.

The `.Created` field was only written to as far as I can see.

cc @yifan-gu & @Random-Liu 

Is there any reason we might want to keep this around?
This commit is contained in:
k8s-merge-robot
2016-05-08 16:21:05 -07:00
6 changed files with 65 additions and 82 deletions

View File

@@ -44,19 +44,17 @@ func TestMapState(t *testing.T) {
func TestToRuntimeContainer(t *testing.T) {
original := &dockertypes.Container{
ID: "ab2cdf",
Image: "bar_image",
Created: 12345,
Names: []string{"/k8s_bar.5678_foo_ns_1234_42"},
Status: "Up 5 hours",
ID: "ab2cdf",
Image: "bar_image",
Names: []string{"/k8s_bar.5678_foo_ns_1234_42"},
Status: "Up 5 hours",
}
expected := &kubecontainer.Container{
ID: kubecontainer.ContainerID{Type: "docker", ID: "ab2cdf"},
Name: "bar",
Image: "bar_image",
Hash: 0x5678,
Created: 12345,
State: kubecontainer.ContainerStateRunning,
ID: kubecontainer.ContainerID{Type: "docker", ID: "ab2cdf"},
Name: "bar",
Image: "bar_image",
Hash: 0x5678,
State: kubecontainer.ContainerStateRunning,
}
actual, err := toRuntimeContainer(original)