Skip to content

feat(scaletest): annotate scaletest pod when scaletest is in progress #10235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 12, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lib.sh: add annotate_self function
  • Loading branch information
johnstcn committed Oct 12, 2023
commit f06ffc15cb9c0b30ceb127bf5b8bcbf42e3f433c
11 changes: 11 additions & 0 deletions scaletest/templates/scaletest-runner/scripts/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -295,3 +295,14 @@ fetch_coder_full() {
maybedryrun "${DRY_RUN}" chmod +x "${SCALETEST_CODER_BINARY}"
log "Full Coder binary downloaded to ${SCALETEST_CODER_BINARY}"
}

# set_status_annotation annotates the currently running pod with the key
# com.coder.scaletest.status. It will overwrite the previous status.
set_status_annotation() {
if [[ $# -ne 1 ]]; then
log "must specify an annotation value"
exit 1
else
maybedryrun "${DRY_RUN}" kubectl --namespace "$(namespace)" annotate pod "$(hostname)" "com.coder.scaletest.status=$2" --overwrite
fi
}