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
96c0fe9b
Commit
96c0fe9b
authored
Jun 21, 2017
by
yiqinguo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If err does not add continue, type conversion will be error.
If do not add continue, pod. (* V1.Pod) may cause panic to run.
parent
5ca33f51
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
config.go
pkg/kubelet/config/config.go
+2
-0
No files found.
pkg/kubelet/config/config.go
View file @
96c0fe9b
...
@@ -505,6 +505,7 @@ func (s *podStorage) MergedState() interface{} {
...
@@ -505,6 +505,7 @@ func (s *podStorage) MergedState() interface{} {
pod
,
err
:=
api
.
Scheme
.
Copy
(
podRef
)
pod
,
err
:=
api
.
Scheme
.
Copy
(
podRef
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"unable to copy pod: %v"
,
err
)
glog
.
Errorf
(
"unable to copy pod: %v"
,
err
)
continue
}
}
pods
=
append
(
pods
,
pod
.
(
*
v1
.
Pod
))
pods
=
append
(
pods
,
pod
.
(
*
v1
.
Pod
))
}
}
...
@@ -519,6 +520,7 @@ func copyPods(sourcePods []*v1.Pod) []*v1.Pod {
...
@@ -519,6 +520,7 @@ func copyPods(sourcePods []*v1.Pod) []*v1.Pod {
pod
,
err
:=
api
.
Scheme
.
Copy
(
source
)
pod
,
err
:=
api
.
Scheme
.
Copy
(
source
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"unable to copy pod: %v"
,
err
)
glog
.
Errorf
(
"unable to copy pod: %v"
,
err
)
continue
}
}
pods
=
append
(
pods
,
pod
.
(
*
v1
.
Pod
))
pods
=
append
(
pods
,
pod
.
(
*
v1
.
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