Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
5865ab75
Commit
5865ab75
authored
Dec 10, 2014
by
Dawn Chen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2808 from simon3z/master
api: add container's id to ContainerStatus
parents
f81ec248
4af64b89
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
4 deletions
+9
-4
types.go
pkg/api/types.go
+2
-1
types.go
pkg/api/v1beta1/types.go
+2
-1
types.go
pkg/api/v1beta2/types.go
+2
-1
types.go
pkg/api/v1beta3/types.go
+1
-0
docker.go
pkg/kubelet/dockertools/docker.go
+2
-1
No files found.
pkg/api/types.go
View file @
5865ab75
...
@@ -405,7 +405,8 @@ type ContainerStatus struct {
...
@@ -405,7 +405,8 @@ type ContainerStatus struct {
// not just PodInfo. Now we need this to remove docker.Container from API
// not just PodInfo. Now we need this to remove docker.Container from API
PodIP
string
`json:"podIP,omitempty"`
PodIP
string
`json:"podIP,omitempty"`
// TODO(dchen1107): Need to decide how to represent this in v1beta3
// 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.
// PodInfo contains one entry for every container with available info.
...
...
pkg/api/v1beta1/types.go
View file @
5865ab75
...
@@ -364,7 +364,8 @@ type ContainerStatus struct {
...
@@ -364,7 +364,8 @@ type ContainerStatus struct {
// not just PodInfo. Now we need this to remove docker.Container from API
// not just PodInfo. Now we need this to remove docker.Container from API
PodIP
string
`json:"podIP,omitempty" description:"pod's IP address"`
PodIP
string
`json:"podIP,omitempty" description:"pod's IP address"`
// TODO(dchen1107): Need to decide how to reprensent this in v1beta3
// 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.
// PodInfo contains one entry for every container with available info.
...
...
pkg/api/v1beta2/types.go
View file @
5865ab75
...
@@ -329,7 +329,8 @@ type ContainerStatus struct {
...
@@ -329,7 +329,8 @@ type ContainerStatus struct {
// not just PodInfo. Now we need this to remove docker.Container from API
// not just PodInfo. Now we need this to remove docker.Container from API
PodIP
string
`json:"podIP,omitempty" description:"pod's IP address"`
PodIP
string
`json:"podIP,omitempty" description:"pod's IP address"`
// TODO(dchen1107): Need to decide how to reprensent this in v1beta3
// 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.
// PodInfo contains one entry for every container with available info.
...
...
pkg/api/v1beta3/types.go
View file @
5865ab75
...
@@ -423,6 +423,7 @@ type ContainerStatus struct {
...
@@ -423,6 +423,7 @@ type ContainerStatus struct {
RestartCount
int
`json:"restartCount"`
RestartCount
int
`json:"restartCount"`
// TODO(dchen1107): Introduce our own NetworkSettings struct here?
// TODO(dchen1107): Introduce our own NetworkSettings struct here?
// TODO(dchen1107): Which image the container is running with?
// 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.
// PodInfo contains one entry for every container with available info.
...
...
pkg/kubelet/dockertools/docker.go
View file @
5865ab75
...
@@ -389,7 +389,8 @@ func inspectContainer(client DockerInterface, dockerID, containerName, tPath str
...
@@ -389,7 +389,8 @@ func inspectContainer(client DockerInterface, dockerID, containerName, tPath str
glog
.
V
(
3
)
.
Infof
(
"Container inspect result: %+v"
,
*
inspectResult
)
glog
.
V
(
3
)
.
Infof
(
"Container inspect result: %+v"
,
*
inspectResult
)
containerStatus
:=
api
.
ContainerStatus
{
containerStatus
:=
api
.
ContainerStatus
{
Image
:
inspectResult
.
Config
.
Image
,
Image
:
inspectResult
.
Config
.
Image
,
ContainerID
:
"docker://"
+
dockerID
,
}
}
waiting
:=
true
waiting
:=
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment