diff --git a/pkg/kubelet/container/runtime.go b/pkg/kubelet/container/runtime.go index bbc322b1975..8a154f272c8 100644 --- a/pkg/kubelet/container/runtime.go +++ b/pkg/kubelet/container/runtime.go @@ -254,17 +254,6 @@ func (c *ContainerID) UnmarshalJSON(data []byte) error { return c.ParseString(string(data)) } -// DockerID is an ID of docker container. It is a type to make it clear when we're working with docker container Ids -type DockerID string - -// ContainerID converts DockerID into a ContainerID. -func (id DockerID) ContainerID() ContainerID { - return ContainerID{ - Type: "docker", - ID: string(id), - } -} - // State represents the state of a container type State string diff --git a/pkg/kubelet/kuberuntime/legacy_test.go b/pkg/kubelet/kuberuntime/legacy_test.go index 7d99032fd3d..61cf9d92461 100644 --- a/pkg/kubelet/kuberuntime/legacy_test.go +++ b/pkg/kubelet/kuberuntime/legacy_test.go @@ -40,10 +40,10 @@ func TestLogSymLink(t *testing.T) { containerLogsDir := "/foo/bar" podFullName := randStringBytes(128) containerName := randStringBytes(70) - dockerID := randStringBytes(80) + containerID := randStringBytes(80) // The file name cannot exceed 255 characters. Since .log suffix is required, the prefix cannot exceed 251 characters. - expectedPath := filepath.Join(containerLogsDir, fmt.Sprintf("%s_%s-%s", podFullName, containerName, dockerID)[:251]+".log") - as.Equal(expectedPath, logSymlink(containerLogsDir, podFullName, containerName, dockerID)) + expectedPath := filepath.Join(containerLogsDir, fmt.Sprintf("%s_%s-%s", podFullName, containerName, containerID)[:251]+".log") + as.Equal(expectedPath, logSymlink(containerLogsDir, podFullName, containerName, containerID)) } func TestLegacyLogSymLink(t *testing.T) {