Skip to content

Commit 96f6571

Browse files
fix: accomodate for pending pods with no IP address in network fault (#684)
Signed-off-by: smit thakkar <[email protected]> Co-authored-by: Shubham Chaudhary <[email protected]>
1 parent b9f897b commit 96f6571

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

chaoslib/litmus/network-chaos/lib/network-chaos.go

+3
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@ func getPodIPFromService(host string, clients clients.ClientSets) ([]string, err
358358
return ips, cerrors.Error{ErrorCode: cerrors.ErrorTypeGeneric, Target: fmt.Sprintf("{svcName: %s,podLabel: %s, namespace: %s}", svcNs, svcSelector, svcNs), Reason: fmt.Sprintf("failed to derive pods from service: %s", err.Error())}
359359
}
360360
for _, p := range pods.Items {
361+
if p.Status.PodIP == "" {
362+
continue
363+
}
361364
ips = append(ips, p.Status.PodIP)
362365
}
363366

0 commit comments

Comments
 (0)