From f79beb8cddc02b18340cfe62b8cc5bad7e4490df Mon Sep 17 00:00:00 2001 From: Joe Talerico Date: Wed, 8 Nov 2023 15:21:20 -0500 Subject: [PATCH] Skip hostNetwork through Service No need to run this scenario. Signed-off-by: Joe Talerico --- cmd/k8s-netperf/k8s-netperf.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/cmd/k8s-netperf/k8s-netperf.go b/cmd/k8s-netperf/k8s-netperf.go index 117754d4..3a0324e2 100644 --- a/cmd/k8s-netperf/k8s-netperf.go +++ b/cmd/k8s-netperf/k8s-netperf.go @@ -156,12 +156,15 @@ var rootCmd = &cobra.Command{ nc.AcrossAZ = acrossAZ if s.HostNetwork { - npr := executeWorkload(nc, s, true, false) - sr.Results = append(sr.Results, npr) - if iperf3 { - ipr := executeWorkload(nc, s, true, true) - if len(ipr.Profile) > 1 { - sr.Results = append(sr.Results, ipr) + // No need to run hostNetwork through Service. + if !nc.Service { + npr := executeWorkload(nc, s, true, false) + sr.Results = append(sr.Results, npr) + if iperf3 { + ipr := executeWorkload(nc, s, true, true) + if len(ipr.Profile) > 1 { + sr.Results = append(sr.Results, ipr) + } } } }