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
2d061aa1
Commit
2d061aa1
authored
Jan 30, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #19784 from Random-Liu/cleanup-kubelet-syncpod
Auto commit by PR queue bot
parents
e953f4a0
eb56d46b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
12 deletions
+2
-12
manager.go
pkg/kubelet/dockertools/manager.go
+0
-1
kubelet.go
pkg/kubelet/kubelet.go
+2
-11
No files found.
pkg/kubelet/dockertools/manager.go
View file @
2d061aa1
...
@@ -441,7 +441,6 @@ func (dm *DockerManager) ConvertPodStatusToAPIPodStatus(pod *api.Pod, podStatus
...
@@ -441,7 +441,6 @@ func (dm *DockerManager) ConvertPodStatusToAPIPodStatus(pod *api.Pod, podStatus
}
}
containerDone
:=
sets
.
NewString
()
containerDone
:=
sets
.
NewString
()
// NOTE(random-liu): The Pod IP is generated in kubelet.generatePodStatus(), we have no podStatus.IP now
apiPodStatus
.
PodIP
=
podStatus
.
IP
apiPodStatus
.
PodIP
=
podStatus
.
IP
for
_
,
containerStatus
:=
range
podStatus
.
ContainerStatuses
{
for
_
,
containerStatus
:=
range
podStatus
.
ContainerStatuses
{
cName
:=
containerStatus
.
Name
cName
:=
containerStatus
.
Name
...
...
pkg/kubelet/kubelet.go
View file @
2d061aa1
...
@@ -1688,17 +1688,8 @@ func (kl *Kubelet) syncPod(pod *api.Pod, mirrorPod *api.Pod, runningPod kubecont
...
@@ -1688,17 +1688,8 @@ func (kl *Kubelet) syncPod(pod *api.Pod, mirrorPod *api.Pod, runningPod kubecont
if
podUsesHostNetwork
(
pod
)
{
if
podUsesHostNetwork
(
pod
)
{
kl
.
recorder
.
Event
(
pod
,
api
.
EventTypeWarning
,
kubecontainer
.
HostNetworkNotSupported
,
"Bandwidth shaping is not currently supported on the host network"
)
kl
.
recorder
.
Event
(
pod
,
api
.
EventTypeWarning
,
kubecontainer
.
HostNetworkNotSupported
,
"Bandwidth shaping is not currently supported on the host network"
)
}
else
if
kl
.
shaper
!=
nil
{
}
else
if
kl
.
shaper
!=
nil
{
status
,
found
:=
kl
.
statusManager
.
GetPodStatus
(
pod
.
UID
)
if
len
(
apiPodStatus
.
PodIP
)
>
0
{
if
!
found
{
err
=
kl
.
shaper
.
ReconcileCIDR
(
fmt
.
Sprintf
(
"%s/32"
,
apiPodStatus
.
PodIP
),
egress
,
ingress
)
statusPtr
,
err
:=
kl
.
containerRuntime
.
GetAPIPodStatus
(
pod
)
if
err
!=
nil
{
glog
.
Errorf
(
"Error getting pod for bandwidth shaping"
)
return
err
}
status
=
*
statusPtr
}
if
len
(
status
.
PodIP
)
>
0
{
err
=
kl
.
shaper
.
ReconcileCIDR
(
fmt
.
Sprintf
(
"%s/32"
,
status
.
PodIP
),
egress
,
ingress
)
}
}
}
else
{
}
else
{
kl
.
recorder
.
Event
(
pod
,
api
.
EventTypeWarning
,
kubecontainer
.
UndefinedShaper
,
"Pod requests bandwidth shaping, but the shaper is undefined"
)
kl
.
recorder
.
Event
(
pod
,
api
.
EventTypeWarning
,
kubecontainer
.
UndefinedShaper
,
"Pod requests bandwidth shaping, but the shaper is undefined"
)
...
...
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