Skip to content

Commit

Permalink
Change label name, update commands for benchmark pods
Browse files Browse the repository at this point in the history
* Change label name for benchmark pods to align benchmark pods with service creation
* Update throughput and latency client & server pods
* Update network_pods: latency tests will not be supported with globalnet

Signed-off-by: Maayan Friedman <[email protected]>
  • Loading branch information
maayanf24 authored Dec 23, 2020
1 parent d075fea commit b572aa7
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions test/e2e/framework/network_pods.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func (np *NetworkPod) buildThroughputClientPod() {
ObjectMeta: metav1.ObjectMeta{
GenerateName: "nettest-client-pod",
Labels: map[string]string{
"run": "nettest-client-pod",
TestAppLabel: "nettest-client-pod",
},
},
Spec: v1.PodSpec{
Expand All @@ -282,10 +282,13 @@ func (np *NetworkPod) buildThroughputClientPod() {
Name: "nettest-client-pod",
Image: "quay.io/submariner/nettest:devel",
ImagePullPolicy: v1.PullAlways,
Command: []string{
"sh", "-c", "iperf3 -w 256K -P 10 -c $TARGET_IP >/dev/termination-log 2>&1"},
Command: []string{"sh", "-c", "for i in $(seq $CONN_TRIES); do if iperf3 -w 256K --connect-timeout $CONN_TIMEOUT -P 10 -p $TARGET_PORT -c $TARGET_IP; then break; else echo [going to retry]; sleep $RETRY_SLEEP; fi; done >/dev/termination-log 2>&1"},
Env: []v1.EnvVar{
{Name: "TARGET_IP", Value: np.Config.RemoteIP},
{Name: "TARGET_PORT", Value: strconv.Itoa(np.Config.Port)},
{Name: "CONN_TRIES", Value: strconv.Itoa(int(np.Config.ConnectionAttempts))},
{Name: "RETRY_SLEEP", Value: strconv.Itoa(int(np.Config.ConnectionTimeout))},
{Name: "CONN_TIMEOUT", Value: strconv.Itoa(int(np.Config.ConnectionTimeout))},
},
},
},
Expand All @@ -306,7 +309,7 @@ func (np *NetworkPod) buildThroughputServerPod() {
ObjectMeta: metav1.ObjectMeta{
GenerateName: "nettest-server-pod",
Labels: map[string]string{
"run": "nettest-server-pod",
TestAppLabel: "nettest-server-pod",
},
},
Spec: v1.PodSpec{
Expand All @@ -317,7 +320,10 @@ func (np *NetworkPod) buildThroughputServerPod() {
Name: "nettest-server-pod",
Image: "quay.io/submariner/nettest:devel",
ImagePullPolicy: v1.PullAlways,
Command: []string{"iperf3", "-s"},
Command: []string{"sh", "-c", "iperf3 -s -p $TARGET_PORT"},
Env: []v1.EnvVar{
{Name: "TARGET_PORT", Value: strconv.Itoa(np.Config.Port)},
},
},
},
Tolerations: []v1.Toleration{{Operator: v1.TolerationOpExists}},
Expand All @@ -339,7 +345,7 @@ func (np *NetworkPod) buildLatencyClientPod() {
ObjectMeta: metav1.ObjectMeta{
GenerateName: "latency-client-pod",
Labels: map[string]string{
"run": "latency-client-pod",
TestAppLabel: "latency-client-pod",
},
},
Spec: v1.PodSpec{
Expand Down Expand Up @@ -374,7 +380,7 @@ func (np *NetworkPod) buildLatencyServerPod() {
ObjectMeta: metav1.ObjectMeta{
GenerateName: "latency-server-pod",
Labels: map[string]string{
"run": "latency-server-pod",
TestAppLabel: "latency-server-pod",
},
},
Spec: v1.PodSpec{
Expand Down Expand Up @@ -442,4 +448,4 @@ func removeDupDataplaneLines(output string) string {
}

return strings.Join(newLines, "\n")
}
}

0 comments on commit b572aa7

Please sign in to comment.