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
d51753ec
Commit
d51753ec
authored
Jan 03, 2018
by
zhangxiaoyu-zidif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unify the print of pod metadata
parent
7253c35c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
endpoints_controller.go
pkg/controller/endpoint/endpoints_controller.go
+3
-3
No files found.
pkg/controller/endpoint/endpoints_controller.go
View file @
d51753ec
...
@@ -193,7 +193,7 @@ func (e *EndpointController) addPod(obj interface{}) {
...
@@ -193,7 +193,7 @@ func (e *EndpointController) addPod(obj interface{}) {
pod
:=
obj
.
(
*
v1
.
Pod
)
pod
:=
obj
.
(
*
v1
.
Pod
)
services
,
err
:=
e
.
getPodServiceMemberships
(
pod
)
services
,
err
:=
e
.
getPodServiceMemberships
(
pod
)
if
err
!=
nil
{
if
err
!=
nil
{
utilruntime
.
HandleError
(
fmt
.
Errorf
(
"Unable to get pod %
v/%v
's service memberships: %v"
,
pod
.
Namespace
,
pod
.
Name
,
err
))
utilruntime
.
HandleError
(
fmt
.
Errorf
(
"Unable to get pod %
s/%s
's service memberships: %v"
,
pod
.
Namespace
,
pod
.
Name
,
err
))
return
return
}
}
for
key
:=
range
services
{
for
key
:=
range
services
{
...
@@ -328,7 +328,7 @@ func (e *EndpointController) deletePod(obj interface{}) {
...
@@ -328,7 +328,7 @@ func (e *EndpointController) deletePod(obj interface{}) {
utilruntime
.
HandleError
(
fmt
.
Errorf
(
"Tombstone contained object that is not a Pod: %#v"
,
obj
))
utilruntime
.
HandleError
(
fmt
.
Errorf
(
"Tombstone contained object that is not a Pod: %#v"
,
obj
))
return
return
}
}
glog
.
V
(
4
)
.
Infof
(
"Enqueuing services of deleted pod %s
having final state unrecorded"
,
pod
.
Name
)
glog
.
V
(
4
)
.
Infof
(
"Enqueuing services of deleted pod %s
/%s having final state unrecorded"
,
pod
.
Namespace
,
pod
.
Name
)
e
.
addPod
(
pod
)
e
.
addPod
(
pod
)
}
}
...
@@ -563,7 +563,7 @@ func addEndpointSubset(subsets []v1.EndpointSubset, pod *v1.Pod, epa v1.Endpoint
...
@@ -563,7 +563,7 @@ func addEndpointSubset(subsets []v1.EndpointSubset, pod *v1.Pod, epa v1.Endpoint
})
})
readyEps
++
readyEps
++
}
else
if
shouldPodBeInEndpoints
(
pod
)
{
}
else
if
shouldPodBeInEndpoints
(
pod
)
{
glog
.
V
(
5
)
.
Infof
(
"Pod is out of service: %
v/%v
"
,
pod
.
Namespace
,
pod
.
Name
)
glog
.
V
(
5
)
.
Infof
(
"Pod is out of service: %
s/%s
"
,
pod
.
Namespace
,
pod
.
Name
)
subsets
=
append
(
subsets
,
v1
.
EndpointSubset
{
subsets
=
append
(
subsets
,
v1
.
EndpointSubset
{
NotReadyAddresses
:
[]
v1
.
EndpointAddress
{
epa
},
NotReadyAddresses
:
[]
v1
.
EndpointAddress
{
epa
},
Ports
:
[]
v1
.
EndpointPort
{
epp
},
Ports
:
[]
v1
.
EndpointPort
{
epp
},
...
...
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