-
Notifications
You must be signed in to change notification settings - Fork 0
/
client-job-template.yaml
30 lines (29 loc) · 1.03 KB
/
client-job-template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
################################################
# Copyright 2022- IBM Inc. All rights reserved
# SPDX-License-Identifier: Apache-2.0
################################################
apiVersion: batch/v1
kind: Job
metadata:
name: iperfclientf1
spec:
template:
spec:
containers:
- name: iperfclientf1
image: sunyanan/iperf3ping
imagePullPolicy: IfNotPresent
tty: true
stdin: true
command: ["/bin/bash", "-c"]
env:
- name: TIME
value: "60"
args:
- for i in {1..5}; do cp /dev/null /tmp/iperf.json; iperf3 -c SERVER_IP -t ${TIME} -J --logfile /tmp/iperf.json; echo $(date "+%Y%m%d-%H%M"),$(jq .end.sum_sent.bits_per_second /tmp/iperf.json),$(jq .end.sum_received.bits_per_second /tmp/iperf.json),$(jq .end.sum_sent.retransmits /tmp/iperf.json); cat /tmp/iperf.json; done;
nodeSelector:
role: worker
imagePullSecrets:
- name: res-cpe-team-docker-local
restartPolicy: Never
backoffLimit: 4