mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-16 06:32:32 +00:00
api: add image's id to ContainerStatus
Sometimes for external applications it is important to identify exactly what images are running. Since tags can be moved to point to newer builds this information can be used to identify old images running. Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
This commit is contained in:
@@ -41,6 +41,7 @@ import (
|
||||
|
||||
const (
|
||||
PodInfraContainerName = leaky.PodInfraContainerName
|
||||
DockerPrefix = "docker://"
|
||||
)
|
||||
|
||||
// DockerInterface is an abstract interface for testability. It abstracts the interface of docker.Client.
|
||||
@@ -399,7 +400,8 @@ func inspectContainer(client DockerInterface, dockerID, containerName, tPath str
|
||||
glog.V(3).Infof("Container inspect result: %+v", *inspectResult)
|
||||
containerStatus := api.ContainerStatus{
|
||||
Image: inspectResult.Config.Image,
|
||||
ContainerID: "docker://" + dockerID,
|
||||
ImageID: DockerPrefix + inspectResult.Image,
|
||||
ContainerID: DockerPrefix + dockerID,
|
||||
}
|
||||
|
||||
waiting := true
|
||||
|
Reference in New Issue
Block a user