Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d282f47

Browse files
committed
Fix: With TolerateUnready set, endpoints are still listed for a Pod in state terminating
* Otherwise it prevents long running task in a preStop hook to succeed, that require DNS resolution should lis available even when Pods are in termi
1 parent ddcd970 commit d282f47

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/controller/endpoint/endpoints_controller.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ func (e *EndpointController) syncService(key string) error {
402402
glog.V(5).Infof("Failed to find an IP for pod %s/%s", pod.Namespace, pod.Name)
403403
continue
404404
}
405-
if pod.DeletionTimestamp != nil {
405+
if !tolerateUnreadyEndpoints && pod.DeletionTimestamp != nil {
406406
glog.V(5).Infof("Pod is being deleted %s/%s", pod.Namespace, pod.Name)
407407
continue
408408
}

0 commit comments

Comments
 (0)