Skip to content
This repository was archived by the owner on Aug 7, 2025. It is now read-only.

Commit 50553aa

Browse files
dklyleobedmr
authored andcommitted
only collect noschedule once
As part of the existing json file, there is a 'kubectl get nodes' json dump. Instead of collecting this information each pod launch, use the data already gathered. This data is immutable during the test runs. This greatly improves the overall runtime of the test script by preventing expensive kubectl execs per node per iteration. Signed-off-by: David Lyle <dklyle0@gmail.com>
1 parent 174c836 commit 50553aa

3 files changed

Lines changed: 149 additions & 217 deletions

File tree

metrics/collectd/collectd.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ cleanup_stats() {
3434
while read -u 3 name node; do
3535
kubectl exec -ti $name -- sh -c "cd /opt/collectd; tar -czvf localhost.tar.gz localhost"
3636
# make a backup on the host in-case collection fail
37+
kubectl exec -ti $name -- sh -c "mkdir -p /mnt/opt/collectd"
3738
kubectl exec -ti $name -- sh -c "cp /opt/collectd/localhost.tar.gz /mnt/opt/collectd/localhost.tar.gz"
3839
kubectl cp $name:/opt/collectd/localhost.tar.gz ${RESULT_DIR}/${node}.tar.gz
3940
done 3< <(kubectl get pods --selector name=collectd-pods -o json | jq -r '.items[] | "\(.metadata.name) \(.spec.nodeName)"')

0 commit comments

Comments
 (0)