mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-19 08:40:42 +00:00
unify the print of pod metadata
This commit is contained in:
parent
7253c35ceb
commit
d51753ec5d
@ -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{}) {
|
|||||||
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
|
|||||||
})
|
})
|
||||||
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},
|
||||||
|
Loading…
Reference in New Issue
Block a user