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
623278fd
Commit
623278fd
authored
Aug 01, 2018
by
tanshanshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add ns info for pod in log
parent
28b6fb5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
gc_controller.go
pkg/controller/podgc/gc_controller.go
+5
-5
No files found.
pkg/controller/podgc/gc_controller.go
View file @
623278fd
...
...
@@ -59,7 +59,7 @@ func NewPodGC(kubeClient clientset.Interface, podInformer coreinformers.PodInfor
kubeClient
:
kubeClient
,
terminatedPodThreshold
:
terminatedPodThreshold
,
deletePod
:
func
(
namespace
,
name
string
)
error
{
glog
.
Infof
(
"PodGC is force deleting Pod: %v
:
%v"
,
namespace
,
name
)
glog
.
Infof
(
"PodGC is force deleting Pod: %v
/
%v"
,
namespace
,
name
)
return
kubeClient
.
CoreV1
()
.
Pods
(
namespace
)
.
Delete
(
name
,
metav1
.
NewDeleteOptions
(
0
))
},
}
...
...
@@ -159,11 +159,11 @@ func (gcc *PodGCController) gcOrphaned(pods []*v1.Pod) {
if
nodeNames
.
Has
(
pod
.
Spec
.
NodeName
)
{
continue
}
glog
.
V
(
2
)
.
Infof
(
"Found orphaned Pod %v
assigned to the Node %v. Deleting."
,
pod
.
Name
,
pod
.
Spec
.
NodeName
)
glog
.
V
(
2
)
.
Infof
(
"Found orphaned Pod %v
/%v assigned to the Node %v. Deleting."
,
pod
.
Namespace
,
pod
.
Name
,
pod
.
Spec
.
NodeName
)
if
err
:=
gcc
.
deletePod
(
pod
.
Namespace
,
pod
.
Name
);
err
!=
nil
{
utilruntime
.
HandleError
(
err
)
}
else
{
glog
.
V
(
0
)
.
Infof
(
"Forced deletion of orphaned Pod %
s succeeded"
,
pod
.
Name
)
glog
.
V
(
0
)
.
Infof
(
"Forced deletion of orphaned Pod %
v/%v succeeded"
,
pod
.
Namespace
,
pod
.
Name
)
}
}
}
...
...
@@ -177,11 +177,11 @@ func (gcc *PodGCController) gcUnscheduledTerminating(pods []*v1.Pod) {
continue
}
glog
.
V
(
2
)
.
Infof
(
"Found unscheduled terminating Pod %v
not assigned to any Node. Deleting."
,
pod
.
Name
)
glog
.
V
(
2
)
.
Infof
(
"Found unscheduled terminating Pod %v
/%v not assigned to any Node. Deleting."
,
pod
.
Namespace
,
pod
.
Name
)
if
err
:=
gcc
.
deletePod
(
pod
.
Namespace
,
pod
.
Name
);
err
!=
nil
{
utilruntime
.
HandleError
(
err
)
}
else
{
glog
.
V
(
0
)
.
Infof
(
"Forced deletion of unscheduled terminating Pod %
s succeeded"
,
pod
.
Name
)
glog
.
V
(
0
)
.
Infof
(
"Forced deletion of unscheduled terminating Pod %
v/%v succeeded"
,
pod
.
Namespace
,
pod
.
Name
)
}
}
}
...
...
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