Skip to content
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

Remove kube-burner configmap when CLEANUP is true #322

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion workloads/kube-burner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ All scripts can be tweaked with the following environment variables:
| **PRELOAD_IMAGES** | Preload kube-buner's benchmark images in the cluster | true |
| **PRELOAD_PERIOD** | How long the preload stage will last | 2m |
| **LOG_STREAMING** | Enable log streaming of kube-burner pod | true |
| **CLEANUP** | Delete old namespaces for the selected workload before starting benchmark | false |
| **CLEANUP** | Delete workload's old namespaces and kube-burner config configmap before starting the benchmark | false |
| **CLEANUP_WHEN_FINISH** | Delete workload's namespaces after running it | false |
| **KUBE_BURNER_IMAGE** | Kube-burner container image | quay.io/cloud-bulldozer/kube-burner:v0.14.3 |
| **LOG_LEVEL** | Kube-burner log level | info |
Expand Down
3 changes: 3 additions & 0 deletions workloads/kube-burner/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ run_workload() {
cp ${ALERTS_PROFILE} ${tmpdir}/alerts.yml
fi
log "Creating kube-burner configmap"
if [[ ${CLEANUP} == true ]]; then
kubectl delete -n benchmark-operator configmap/kube-burner-cfg-${UUID} --ignore-not-found
fi
kubectl create configmap -n benchmark-operator --from-file=${tmpdir} kube-burner-cfg-${UUID}
rm -rf ${tmpdir}
log "Deploying benchmark"
Expand Down