mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-02 03:08:15 +00:00
Logging for service restart e2e clarity
This commit is contained in:
@@ -380,6 +380,8 @@ func (e *EndpointController) syncService(key string) {
|
||||
}
|
||||
}
|
||||
|
||||
readyEps := 0
|
||||
notReadyEps := 0
|
||||
for i := range pods {
|
||||
// TODO: Do we need to copy here?
|
||||
pod := &(*pods[i])
|
||||
@@ -432,12 +434,14 @@ func (e *EndpointController) syncService(key string) {
|
||||
Addresses: []api.EndpointAddress{epa},
|
||||
Ports: []api.EndpointPort{epp},
|
||||
})
|
||||
readyEps++
|
||||
} else {
|
||||
glog.V(5).Infof("Pod is out of service: %v/%v", pod.Namespace, pod.Name)
|
||||
subsets = append(subsets, api.EndpointSubset{
|
||||
NotReadyAddresses: []api.EndpointAddress{epa},
|
||||
Ports: []api.EndpointPort{epp},
|
||||
})
|
||||
notReadyEps++
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -490,6 +494,7 @@ func (e *EndpointController) syncService(key string) {
|
||||
newEndpoints.Annotations[endpoints.PodHostnamesAnnotation] = serializedPodHostNames
|
||||
}
|
||||
|
||||
glog.V(4).Infof("Update endpoints for %v/%v, ready: %d not ready: %d", service.Namespace, service.Name, readyEps, notReadyEps)
|
||||
createEndpoints := len(currentEndpoints.ResourceVersion) == 0
|
||||
if createEndpoints {
|
||||
// No previous endpoints, create them
|
||||
|
||||
Reference in New Issue
Block a user