From 94d4a7c81e68f928ebfe8b3ee7fbe34eddf78236 Mon Sep 17 00:00:00 2001 From: Mikolaj Pawlikowski Date: Wed, 11 Mar 2020 13:25:12 +0000 Subject: [PATCH] Use HostIP as podIP, if the there is no podIP Signed-off-by: Mikolaj Pawlikowski --- pkg/goldpinger/client.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/goldpinger/client.go b/pkg/goldpinger/client.go index 4f23b6a..a830e8b 100644 --- a/pkg/goldpinger/client.go +++ b/pkg/goldpinger/client.go @@ -98,6 +98,7 @@ func PingAllPods(pods map[string]string) *models.CheckResults { if err != nil { channelResult.podResult = models.PodResult{HostIP: channelResult.hostIPv4, OK: &OK, Error: err.Error(), StatusCode: 500, ResponseTimeMs: responseTime} + channelResult.podIP = hostIP CountError("ping") } else { resp, err := client.Operations.Ping(nil) @@ -174,6 +175,7 @@ func CheckAllPods(pods map[string]string) *models.CheckAllResults { HostIP: channelResult.hostIPv4, Error: err.Error(), } + channelResult.podIP = hostIP CountError("checkAll") } else { resp, err := client.Operations.CheckServicePods(nil)