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
78bc6c2e
Commit
78bc6c2e
authored
Nov 16, 2016
by
gmarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logs near force deletions of Pods
parent
193622b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
0 deletions
+2
-0
controller_utils.go
pkg/controller/node/controller_utils.go
+1
-0
gc_controller.go
pkg/controller/podgc/gc_controller.go
+1
-0
No files found.
pkg/controller/node/controller_utils.go
View file @
78bc6c2e
...
@@ -118,6 +118,7 @@ func setPodTerminationReason(kubeClient clientset.Interface, pod *api.Pod, nodeN
...
@@ -118,6 +118,7 @@ func setPodTerminationReason(kubeClient clientset.Interface, pod *api.Pod, nodeN
func
forcefullyDeletePod
(
c
clientset
.
Interface
,
pod
*
api
.
Pod
)
error
{
func
forcefullyDeletePod
(
c
clientset
.
Interface
,
pod
*
api
.
Pod
)
error
{
var
zero
int64
var
zero
int64
glog
.
Infof
(
"NodeController is force deleting Pod: %v:%v"
,
pod
.
Namespace
,
pod
.
Name
)
err
:=
c
.
Core
()
.
Pods
(
pod
.
Namespace
)
.
Delete
(
pod
.
Name
,
&
api
.
DeleteOptions
{
GracePeriodSeconds
:
&
zero
})
err
:=
c
.
Core
()
.
Pods
(
pod
.
Namespace
)
.
Delete
(
pod
.
Name
,
&
api
.
DeleteOptions
{
GracePeriodSeconds
:
&
zero
})
if
err
==
nil
{
if
err
==
nil
{
glog
.
V
(
4
)
.
Infof
(
"forceful deletion of %s succeeded"
,
pod
.
Name
)
glog
.
V
(
4
)
.
Infof
(
"forceful deletion of %s succeeded"
,
pod
.
Name
)
...
...
pkg/controller/podgc/gc_controller.go
View file @
78bc6c2e
...
@@ -68,6 +68,7 @@ func NewPodGC(kubeClient clientset.Interface, podInformer cache.SharedIndexInfor
...
@@ -68,6 +68,7 @@ func NewPodGC(kubeClient clientset.Interface, podInformer cache.SharedIndexInfor
kubeClient
:
kubeClient
,
kubeClient
:
kubeClient
,
terminatedPodThreshold
:
terminatedPodThreshold
,
terminatedPodThreshold
:
terminatedPodThreshold
,
deletePod
:
func
(
namespace
,
name
string
)
error
{
deletePod
:
func
(
namespace
,
name
string
)
error
{
glog
.
Infof
(
"PodGC is force deleting Pod: %v:%v"
,
namespace
,
name
)
return
kubeClient
.
Core
()
.
Pods
(
namespace
)
.
Delete
(
name
,
api
.
NewDeleteOptions
(
0
))
return
kubeClient
.
Core
()
.
Pods
(
namespace
)
.
Delete
(
name
,
api
.
NewDeleteOptions
(
0
))
},
},
}
}
...
...
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