fix: status.go - check pod terminating state
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
This commit is contained in:
parent
2cec24143d
commit
a26733760d
1 changed files with 5 additions and 0 deletions
|
@ -220,6 +220,11 @@ func (s *statusSync) runningAddresses() ([]v1.IngressLoadBalancerIngress, error)
|
||||||
continue
|
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)
|
name := k8s.GetNodeIPOrName(s.Client, pod.Spec.NodeName, s.UseNodeInternalIP)
|
||||||
if !stringInIngresses(name, addrs) {
|
if !stringInIngresses(name, addrs) {
|
||||||
addrs = append(addrs, nameOrIPToLoadBalancerIngress(name))
|
addrs = append(addrs, nameOrIPToLoadBalancerIngress(name))
|
||||||
|
|
Loading…
Reference in a new issue