Unverified Commit c7b56ace authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #57786 from zhangxiaoyu-zidif/fix-namespace-podname-print

Automatic merge from submit-queue (batch tested with PRs 59373, 59379, 59252, 58295, 57786). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. unify the print of pod metadata **What this PR does / why we need it**: just a trivial fix about print format, not about code logic. fix it by the way **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
parents 385414e5 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)
} }
...@@ -571,7 +571,7 @@ func addEndpointSubset(subsets []v1.EndpointSubset, pod *v1.Pod, epa v1.Endpoint ...@@ -571,7 +571,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},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment