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
dad365fb
Commit
dad365fb
authored
Feb 26, 2015
by
Dawn Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide POD container from end users
parent
900d58ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
integration.go
cmd/integration/integration.go
+2
-1
docker.go
pkg/kubelet/dockertools/docker.go
+2
-1
kubelet.go
pkg/kubelet/kubelet.go
+3
-5
No files found.
cmd/integration/integration.go
View file @
dad365fb
...
@@ -91,7 +91,6 @@ func (fakeKubeletClient) GetPodStatus(host, podNamespace, podID string) (api.Pod
...
@@ -91,7 +91,6 @@ func (fakeKubeletClient) GetPodStatus(host, podNamespace, podID string) (api.Pod
m
:=
make
(
api
.
PodInfo
)
m
:=
make
(
api
.
PodInfo
)
for
k
,
v
:=
range
r
.
Status
.
Info
{
for
k
,
v
:=
range
r
.
Status
.
Info
{
v
.
Ready
=
true
v
.
Ready
=
true
v
.
PodIP
=
"1.2.3.4"
m
[
k
]
=
v
m
[
k
]
=
v
}
}
r
.
Status
.
Info
=
m
r
.
Status
.
Info
=
m
...
@@ -257,8 +256,10 @@ func endpointsSet(c *client.Client, serviceNamespace, serviceID string, endpoint
...
@@ -257,8 +256,10 @@ func endpointsSet(c *client.Client, serviceNamespace, serviceID string, endpoint
return
func
()
(
bool
,
error
)
{
return
func
()
(
bool
,
error
)
{
endpoints
,
err
:=
c
.
Endpoints
(
serviceNamespace
)
.
Get
(
serviceID
)
endpoints
,
err
:=
c
.
Endpoints
(
serviceNamespace
)
.
Get
(
serviceID
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Infof
(
"Error on creating endpoints: %v"
,
err
)
return
false
,
nil
return
false
,
nil
}
}
glog
.
Infof
(
"endpoints: %v"
,
endpoints
.
Endpoints
)
return
len
(
endpoints
.
Endpoints
)
==
endpointCount
,
nil
return
len
(
endpoints
.
Endpoints
)
==
endpointCount
,
nil
}
}
}
}
...
...
pkg/kubelet/dockertools/docker.go
View file @
dad365fb
...
@@ -590,7 +590,8 @@ func inspectContainer(client DockerInterface, dockerID, containerName, tPath str
...
@@ -590,7 +590,8 @@ func inspectContainer(client DockerInterface, dockerID, containerName, tPath str
return
&
containerStatus
,
nil
return
&
containerStatus
,
nil
}
}
// GetDockerPodInfo returns docker info for all containers in the pod/manifest.
// GetDockerPodInfo returns docker info for all containers in the pod/manifest and
// infrastructure container
func
GetDockerPodInfo
(
client
DockerInterface
,
manifest
api
.
PodSpec
,
podFullName
string
,
uid
types
.
UID
)
(
api
.
PodInfo
,
error
)
{
func
GetDockerPodInfo
(
client
DockerInterface
,
manifest
api
.
PodSpec
,
podFullName
string
,
uid
types
.
UID
)
(
api
.
PodInfo
,
error
)
{
info
:=
api
.
PodInfo
{}
info
:=
api
.
PodInfo
{}
expectedContainers
:=
make
(
map
[
string
]
api
.
Container
)
expectedContainers
:=
make
(
map
[
string
]
api
.
Container
)
...
...
pkg/kubelet/kubelet.go
View file @
dad365fb
...
@@ -1692,21 +1692,19 @@ func (kl *Kubelet) GetPodStatus(podFullName string, uid types.UID) (api.PodStatu
...
@@ -1692,21 +1692,19 @@ func (kl *Kubelet) GetPodStatus(podFullName string, uid types.UID) (api.PodStatu
// Assume info is ready to process
// Assume info is ready to process
podStatus
.
Phase
=
getPhase
(
spec
,
info
)
podStatus
.
Phase
=
getPhase
(
spec
,
info
)
podStatus
.
Info
=
api
.
PodInfo
{}
for
_
,
c
:=
range
spec
.
Containers
{
for
_
,
c
:=
range
spec
.
Containers
{
containerStatus
:=
info
[
c
.
Name
]
containerStatus
:=
info
[
c
.
Name
]
containerStatus
.
Ready
=
kl
.
readiness
.
IsReady
(
containerStatus
)
containerStatus
.
Ready
=
kl
.
readiness
.
IsReady
(
containerStatus
)
i
nfo
[
c
.
Name
]
=
containerStatus
podStatus
.
I
nfo
[
c
.
Name
]
=
containerStatus
}
}
podStatus
.
Conditions
=
append
(
podStatus
.
Conditions
,
getPodReadyCondition
(
spec
,
i
nfo
)
...
)
podStatus
.
Conditions
=
append
(
podStatus
.
Conditions
,
getPodReadyCondition
(
spec
,
podStatus
.
I
nfo
)
...
)
netContainerInfo
,
found
:=
info
[
dockertools
.
PodInfraContainerName
]
netContainerInfo
,
found
:=
info
[
dockertools
.
PodInfraContainerName
]
if
found
{
if
found
{
podStatus
.
PodIP
=
netContainerInfo
.
PodIP
podStatus
.
PodIP
=
netContainerInfo
.
PodIP
}
}
// TODO(dchen1107): Change Info to list from map
podStatus
.
Info
=
info
return
podStatus
,
nil
return
podStatus
,
nil
}
}
...
...
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