mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #4191 from simon3z/master
api: add image's id to ContainerStatus
This commit is contained in:
commit
05de54249f
@ -442,6 +442,7 @@ type ContainerStatus struct {
|
||||
PodIP string `json:"podIP,omitempty"`
|
||||
// TODO(dchen1107): Need to decide how to represent this in v1beta3
|
||||
Image string `json:"image"`
|
||||
ImageID string `json:"imageID" description:"ID of the container's image"`
|
||||
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
|
||||
}
|
||||
|
||||
|
@ -408,6 +408,7 @@ type ContainerStatus struct {
|
||||
PodIP string `json:"podIP,omitempty" description:"pod's IP address"`
|
||||
// TODO(dchen1107): Need to decide how to reprensent this in v1beta3
|
||||
Image string `json:"image" description:"image of the container"`
|
||||
ImageID string `json:"imageID" description:"ID of the container's image"`
|
||||
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
|
||||
}
|
||||
|
||||
|
@ -372,6 +372,7 @@ type ContainerStatus struct {
|
||||
PodIP string `json:"podIP,omitempty" description:"pod's IP address"`
|
||||
// TODO(dchen1107): Need to decide how to reprensent this in v1beta3
|
||||
Image string `json:"image" description:"image of the container"`
|
||||
ImageID string `json:"imageID" description:"ID of the container's image"`
|
||||
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
|
||||
}
|
||||
|
||||
|
@ -464,7 +464,8 @@ type ContainerStatus struct {
|
||||
PodIP string `json:"podIP,omitempty"`
|
||||
// TODO(dchen1107): Which image the container is running with?
|
||||
// The image the container is running
|
||||
Image string `json:"image"`
|
||||
Image string `json:"image"`
|
||||
ImageID string `json:"imageID" description:"ID of the container's image"`
|
||||
}
|
||||
|
||||
// PodInfo contains one entry for every container with available info.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user