Skip to content

Commit

Permalink
use envsubst instead of sed
Browse files Browse the repository at this point in the history
  • Loading branch information
ReToCode committed Sep 13, 2023
1 parent e6ee641 commit 01f66d4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/performance/performance-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,9 @@ function run_job() {
kubectl delete job "$name" -n "$ns" --ignore-not-found=true

# start the load test and get the logs
# todo: check if we can add envsubst to build image to make this easier
# using kapp seems like a massive overhead just to replace two variables
# envsubst < "$file" | ko apply --sbom=none -Bf -
sed "s|@SYSTEM_NAMESPACE@|$SYSTEM_NAMESPACE|g" "$file" | sed "s|@KO_DOCKER_REPO@|$KO_DOCKER_REPO|g" | ko apply --sbom=none -Bf -
envsubst < "$file" | ko apply --sbom=none -Bf -

# sleep a bit to make sure the job is created
sleep 5

# Follow logs to wait for job termination
Expand Down

0 comments on commit 01f66d4

Please sign in to comment.