Skip to content

Commit aaf16d8

Browse files
committed
feat(scaletest/templates/scaletest-runner): scale provisioners up and down
1 parent 54830cc commit aaf16d8

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

scaletest/templates/scaletest-runner/scripts/cleanup.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ coder exp scaletest cleanup \
2828
tee "${SCALETEST_RESULTS_DIR}/cleanup-${event}.txt"
2929
end_phase
3030

31+
if [[ $event != prepare ]]; then
32+
start_phase "Scaling down provisioners..."
33+
maybedryrun "$DRY_RUN" kubectl scale deployment/coder-provisioner --replicas 1
34+
maybedryrun "$DRY_RUN" kubectl rollout status deployment/coder-provisioner
35+
fi
36+
3137
if [[ $event = manual ]]; then
3238
echo 'Press any key to continue...'
3339
read -s -r -n 1

scaletest/templates/scaletest-runner/scripts/prepare.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,9 @@ log "Cleaning up from previous runs (if applicable)..."
5151
"${SCRIPTS_DIR}/cleanup.sh" "prepare"
5252

5353
log "Preparation complete!"
54+
55+
log "Scaling up provisioners to ${SCALETEST_PARAM_CREATE_CONCURRENCY}..."
56+
maybedryrun "$DRY_RUN" kubectl scale deployment/coder-provisioner \
57+
--replicas "${SCALETEST_PARAM_CREATE_CONCURRENCY}"
58+
log "Waiting for provisioners to scale up..."
59+
maybedryrun "$DRY_RUN" kubectl rollout status deployment/coder-provisioner

0 commit comments

Comments
 (0)