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
f0b56409
Commit
f0b56409
authored
Feb 18, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21197 from yujuhong/deleted_pod
Auto commit by PR queue bot
parents
bcabc096
3072754c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
manager.go
pkg/kubelet/status/manager.go
+5
-4
No files found.
pkg/kubelet/status/manager.go
View file @
f0b56409
...
@@ -353,6 +353,11 @@ func (m *manager) syncBatch() {
...
@@ -353,6 +353,11 @@ func (m *manager) syncBatch() {
// syncPod syncs the given status with the API server. The caller must not hold the lock.
// syncPod syncs the given status with the API server. The caller must not hold the lock.
func
(
m
*
manager
)
syncPod
(
uid
types
.
UID
,
status
versionedPodStatus
)
{
func
(
m
*
manager
)
syncPod
(
uid
types
.
UID
,
status
versionedPodStatus
)
{
if
!
m
.
needsUpdate
(
uid
,
status
)
{
glog
.
V
(
1
)
.
Infof
(
"Status for pod %q is up-to-date; skipping"
,
uid
)
return
}
// TODO: make me easier to express from client code
// TODO: make me easier to express from client code
pod
,
err
:=
m
.
kubeClient
.
Core
()
.
Pods
(
status
.
podNamespace
)
.
Get
(
status
.
podName
)
pod
,
err
:=
m
.
kubeClient
.
Core
()
.
Pods
(
status
.
podNamespace
)
.
Get
(
status
.
podName
)
if
errors
.
IsNotFound
(
err
)
{
if
errors
.
IsNotFound
(
err
)
{
...
@@ -368,10 +373,6 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) {
...
@@ -368,10 +373,6 @@ func (m *manager) syncPod(uid types.UID, status versionedPodStatus) {
m
.
deletePodStatus
(
uid
)
m
.
deletePodStatus
(
uid
)
return
return
}
}
if
!
m
.
needsUpdate
(
pod
.
UID
,
status
)
{
glog
.
V
(
1
)
.
Infof
(
"Status for pod %q is up-to-date; skipping"
,
format
.
Pod
(
pod
))
return
}
pod
.
Status
=
status
.
status
pod
.
Status
=
status
.
status
// TODO: handle conflict as a retry, make that easier too.
// TODO: handle conflict as a retry, make that easier too.
pod
,
err
=
m
.
kubeClient
.
Core
()
.
Pods
(
pod
.
Namespace
)
.
UpdateStatus
(
pod
)
pod
,
err
=
m
.
kubeClient
.
Core
()
.
Pods
(
pod
.
Namespace
)
.
UpdateStatus
(
pod
)
...
...
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