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
6b1e59e8
Commit
6b1e59e8
authored
Apr 27, 2016
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #24856 from mwielgus/public_drain
Make DrainOptions.getPodsForDeletion public to be reused in ClusterAutoscaler
parents
a907794c
41dde204
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
drain.go
pkg/kubectl/cmd/drain.go
+3
-3
No files found.
pkg/kubectl/cmd/drain.go
View file @
6b1e59e8
...
...
@@ -183,7 +183,7 @@ func (o *DrainOptions) RunDrain() error {
return
err
}
pods
,
err
:=
o
.
g
etPodsForDeletion
()
pods
,
err
:=
o
.
G
etPodsForDeletion
()
if
err
!=
nil
{
return
err
}
...
...
@@ -195,10 +195,10 @@ func (o *DrainOptions) RunDrain() error {
return
nil
}
//
g
etPodsForDeletion returns all the pods we're going to delete. If there are
//
G
etPodsForDeletion returns all the pods we're going to delete. If there are
// any unmanaged pods and the user didn't pass --force, we return that list in
// an error.
func
(
o
*
DrainOptions
)
g
etPodsForDeletion
()
([]
api
.
Pod
,
error
)
{
func
(
o
*
DrainOptions
)
G
etPodsForDeletion
()
([]
api
.
Pod
,
error
)
{
pods
:=
[]
api
.
Pod
{}
podList
,
err
:=
o
.
client
.
Pods
(
api
.
NamespaceAll
)
.
List
(
api
.
ListOptions
{
FieldSelector
:
fields
.
SelectorFromSet
(
fields
.
Set
{
"spec.nodeName"
:
o
.
nodeInfo
.
Name
})})
if
err
!=
nil
{
...
...
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