Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: add container's id to ContainerStatus #2808

Merged
merged 1 commit into from
Dec 11, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion pkg/api/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,8 @@ type ContainerStatus struct {
// not just PodInfo. Now we need this to remove docker.Container from API
PodIP string `json:"podIP,omitempty"`
// TODO(dchen1107): Need to decide how to represent this in v1beta3
Image string `json:"image"`
Image string `json:"image"`
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
}

// PodInfo contains one entry for every container with available info.
Expand Down
3 changes: 2 additions & 1 deletion pkg/api/v1beta1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ type ContainerStatus struct {
// not just PodInfo. Now we need this to remove docker.Container from API
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"`
Image string `json:"image" description:"image of the container"`
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
}

// PodInfo contains one entry for every container with available info.
Expand Down
3 changes: 2 additions & 1 deletion pkg/api/v1beta2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,8 @@ type ContainerStatus struct {
// not just PodInfo. Now we need this to remove docker.Container from API
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"`
Image string `json:"image" description:"image of the container"`
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
}

// PodInfo contains one entry for every container with available info.
Expand Down
1 change: 1 addition & 0 deletions pkg/api/v1beta3/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ type ContainerStatus struct {
RestartCount int `json:"restartCount"`
// TODO(dchen1107): Introduce our own NetworkSettings struct here?
// TODO(dchen1107): Which image the container is running with?
ContainerID string `json:"containerID,omitempty" description:"container's ID in the format 'docker://<container_id>'"`
}

// PodInfo contains one entry for every container with available info.
Expand Down
3 changes: 2 additions & 1 deletion pkg/kubelet/dockertools/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,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,
Image: inspectResult.Config.Image,
ContainerID: "docker://" + dockerID,
}

waiting := true
Expand Down