trigger endpoint update on pod deletion

This commit is contained in:
Minhan Xia
2017-10-30 17:28:54 -07:00
parent d7567cd6c7
commit 5f4145f3de
2 changed files with 11 additions and 0 deletions

View File

@@ -215,6 +215,10 @@ func podToEndpointAddress(pod *v1.Pod) *v1.EndpointAddress {
}
func podChanged(oldPod, newPod *v1.Pod) bool {
// If the pod's deletion timestamp is set, remove endpoint from ready address.
if newPod.DeletionTimestamp != oldPod.DeletionTimestamp {
return true
}
// If the pod's readiness has changed, the associated endpoint address
// will move from the unready endpoints set to the ready endpoints.
// So for the purposes of an endpoint, a readiness change on a pod