fix: status.go - check pod terminating state

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
Timofey Titovets 2023-11-27 16:29:23 +01:00
parent 2cec24143d
commit a26733760d

View file

@ -220,6 +220,11 @@ func (s *statusSync) runningAddresses() ([]v1.IngressLoadBalancerIngress, error)
continue
}
if pod.GetDeletionTimestamp() != nil {
klog.InfoS("POD is terminating", "pod", klog.KObj(&pod), "node", pod.Spec.NodeName)
continue
}
name := k8s.GetNodeIPOrName(s.Client, pod.Spec.NodeName, s.UseNodeInternalIP)
if !stringInIngresses(name, addrs) {
addrs = append(addrs, nameOrIPToLoadBalancerIngress(name))