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
f07e18f8
Commit
f07e18f8
authored
Sep 24, 2016
by
Kubernetes Submit Queue
Committed by
GitHub
Sep 24, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #33426 from ZTE-PaaS/zhangke-patch-052
Automatic merge from submit-queue Fix TODO: Rename podStatus to apiPodStatus, rename internalPodStatus to podStatus
parents
5b3860ce
41ece9a9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
rkt.go
pkg/kubelet/rkt/rkt.go
+3
-5
No files found.
pkg/kubelet/rkt/rkt.go
View file @
f07e18f8
...
...
@@ -1702,7 +1702,7 @@ func (r *Runtime) Status() error {
}
// SyncPod syncs the running pod to match the specified desired pod.
func
(
r
*
Runtime
)
SyncPod
(
pod
*
api
.
Pod
,
podStatus
api
.
PodStatus
,
internalP
odStatus
*
kubecontainer
.
PodStatus
,
pullSecrets
[]
api
.
Secret
,
backOff
*
flowcontrol
.
Backoff
)
(
result
kubecontainer
.
PodSyncResult
)
{
func
(
r
*
Runtime
)
SyncPod
(
pod
*
api
.
Pod
,
_
api
.
PodStatus
,
p
odStatus
*
kubecontainer
.
PodStatus
,
pullSecrets
[]
api
.
Secret
,
backOff
*
flowcontrol
.
Backoff
)
(
result
kubecontainer
.
PodSyncResult
)
{
var
err
error
defer
func
()
{
if
err
!=
nil
{
...
...
@@ -1710,9 +1710,7 @@ func (r *Runtime) SyncPod(pod *api.Pod, podStatus api.PodStatus, internalPodStat
}
}()
// TODO: (random-liu) Stop using running pod in SyncPod()
// TODO: (random-liu) Rename podStatus to apiPodStatus, rename internalPodStatus to podStatus, and use new pod status as much as possible,
// we may stop using apiPodStatus someday.
runningPod
:=
kubecontainer
.
ConvertPodStatusToRunningPod
(
r
.
Type
(),
internalPodStatus
)
runningPod
:=
kubecontainer
.
ConvertPodStatusToRunningPod
(
r
.
Type
(),
podStatus
)
// Add references to all containers.
unidentifiedContainers
:=
make
(
map
[
kubecontainer
.
ContainerID
]
*
kubecontainer
.
Container
)
for
_
,
c
:=
range
runningPod
.
Containers
{
...
...
@@ -1725,7 +1723,7 @@ func (r *Runtime) SyncPod(pod *api.Pod, podStatus api.PodStatus, internalPodStat
c
:=
runningPod
.
FindContainerByName
(
container
.
Name
)
if
c
==
nil
{
if
kubecontainer
.
ShouldContainerBeRestarted
(
&
container
,
pod
,
internalP
odStatus
)
{
if
kubecontainer
.
ShouldContainerBeRestarted
(
&
container
,
pod
,
p
odStatus
)
{
glog
.
V
(
3
)
.
Infof
(
"Container %+v is dead, but RestartPolicy says that we should restart it."
,
container
)
// TODO(yifan): Containers in one pod are fate-sharing at this moment, see:
// https://github.com/appc/spec/issues/276.
...
...
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