Refactor build/parse dockername. #3511
Functions Build/ParseDockerName now work with struct instead of the long list of arguments. This new struct also was reused in the kubelet.go instead of auxilary podContainer struct.
This commit is contained in:
@@ -213,13 +213,14 @@ func (self *realContainerGC) evictableContainers() (containersByEvictUnit, []con
|
||||
createTime: data.Created,
|
||||
}
|
||||
|
||||
_, uid, name, _, err := dockertools.ParseDockerName(container.Names[0])
|
||||
containerName, _, err := dockertools.ParseDockerName(container.Names[0])
|
||||
|
||||
if err != nil {
|
||||
unidentifiedContainers = append(unidentifiedContainers, containerInfo)
|
||||
} else {
|
||||
key := evictUnit{
|
||||
uid: uid,
|
||||
name: name,
|
||||
uid: containerName.PodUID,
|
||||
name: containerName.ContainerName,
|
||||
}
|
||||
evictUnits[key] = append(evictUnits[key], containerInfo)
|
||||
}
|
||||
|
Reference in New Issue
Block a user