Merge pull request #8659 from GabyCT/topic/improvecleanuplatency

metrics: Improve latency network cleanup
This commit is contained in:
GabyCT 2023-12-14 13:57:28 -06:00 committed by GitHub
commit 7a606a19c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,6 +18,12 @@ function remove_tmp_file() {
trap remove_tmp_file EXIT
function latency_cleanup() {
info "Latency test cleanup"
kubectl delete -f "${SCRIPT_PATH}/latency-server.yaml"
kubectl delete -f "${SCRIPT_PATH}/latency-client.yaml"
}
function main() {
init_env
cmds=("bc" "jq")
@ -44,6 +50,8 @@ function main() {
# Create client
kubectl create -f "${SCRIPT_PATH}/latency-client.yaml"
trap latency_cleanup EXIT
# Get the names of the client pod
export client_pod_name="latency-client"
@ -80,9 +88,5 @@ EOF
metrics_json_add_array_element "$json"
metrics_json_end_array "Results"
metrics_json_save
kubectl delete pod "$client_pod_name" "$server_pod_name"
kubectl get pods -A
check_processes
}
main "$@"