mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-31 08:36:16 +00:00
Add IPv6 option for e2e iPerf test
The e2e iPerf test case currently only runs in IPv4 mode. This change add an option to run an iPerf test in IPv6 mode (i.e. by running iPerf with a "-V" command line flag), so that the test can be run on IPv6-only clusters.
This commit is contained in:
@@ -36,9 +36,8 @@ const (
|
||||
smallClusterTimeout = 200 * time.Second
|
||||
)
|
||||
|
||||
// Declared as Flakey since it has not been proven to run in parallel on small nodes or slow networks in CI
|
||||
// TODO jayunit100 : Retag this test according to semantics from #22401
|
||||
var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking-Performance]", func() {
|
||||
// networkingIPerf test runs iperf on a container in either IPv4 or IPv6 mode.
|
||||
func networkingIPerfTest(isIPv6 bool) {
|
||||
|
||||
f := framework.NewDefaultFramework("network-perf")
|
||||
|
||||
@@ -49,6 +48,11 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking-
|
||||
numServer := 1
|
||||
maxBandwidthBits := gceBandwidthBitsEstimate
|
||||
|
||||
familyStr := ""
|
||||
if isIPv6 {
|
||||
familyStr = "-V "
|
||||
}
|
||||
|
||||
It(fmt.Sprintf("should transfer ~ 1GB onto the service endpoint %v servers (maximum of %v clients)", numServer, numClient), func() {
|
||||
nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet)
|
||||
totalPods := len(nodes.Items)
|
||||
@@ -68,7 +72,7 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking-
|
||||
Args: []string{
|
||||
"/bin/sh",
|
||||
"-c",
|
||||
"/usr/local/bin/iperf -s -p 8001 ",
|
||||
"/usr/local/bin/iperf " + familyStr + "-s -p 8001 ",
|
||||
},
|
||||
Ports: []v1.ContainerPort{{ContainerPort: 8001}},
|
||||
}},
|
||||
@@ -96,7 +100,7 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking-
|
||||
Args: []string{
|
||||
"/bin/sh",
|
||||
"-c",
|
||||
"/usr/local/bin/iperf -c service-for-" + appName + " -p 8002 --reportstyle C && sleep 5",
|
||||
"/usr/local/bin/iperf " + familyStr + "-c service-for-" + appName + " -p 8002 --reportstyle C && sleep 5",
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -153,4 +157,16 @@ var _ = SIGDescribe("Networking IPerf [Experimental] [Slow] [Feature:Networking-
|
||||
framework.Logf("%v had bandwidth %v. Ratio to expected (%v) was %f", ipClient, bandwidth, expectedBandwidth, float64(bandwidth)/float64(expectedBandwidth))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// Declared as Flakey since it has not been proven to run in parallel on small nodes or slow networks in CI
|
||||
// TODO jayunit100 : Retag this test according to semantics from #22401
|
||||
var _ = SIGDescribe("Networking IPerf IPv4 [Experimental] [Feature:Networking-IPv4] [Slow] [Feature:Networking-Performance]", func() {
|
||||
networkingIPerfTest(false)
|
||||
})
|
||||
|
||||
// Declared as Flakey since it has not been proven to run in parallel on small nodes or slow networks in CI
|
||||
// TODO jayunit100 : Retag this test according to semantics from #22401
|
||||
var _ = SIGDescribe("Networking IPerf IPv6 [Experimental] [Feature:Networking-IPv6] [Slow] [Feature:Networking-Performance]", func() {
|
||||
networkingIPerfTest(true)
|
||||
})
|
||||
|
Reference in New Issue
Block a user