forked from krkn-chaos/krkn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Kubernetes prometheus telemetry + functional tests (krkn-chaos#566)
added comment on the node selector input.yaml Signed-off-by: Tullio Sebastiani <[email protected]>
- Loading branch information
1 parent
c7ea366
commit 2e38b8b
Showing
8 changed files
with
130 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
set -xeEo pipefail | ||
|
||
source CI/tests/common.sh | ||
|
||
trap error ERR | ||
trap finish EXIT | ||
|
||
|
||
function functional_test_telemetry { | ||
AWS_CLI=`which aws` | ||
[ -z "$AWS_CLI" ]&& echo "AWS cli not found in path" && exit 1 | ||
[ -z "$AWS_BUCKET" ] && echo "AWS bucket not set in environment" && exit 1 | ||
|
||
export RUN_TAG="funtest-telemetry" | ||
yq -i '.telemetry.enabled=True' CI/config/common_test_config.yaml | ||
yq -i '.telemetry.full_prometheus_backup=True' CI/config/common_test_config.yaml | ||
yq -i '.telemetry.run_tag=env(RUN_TAG)' CI/config/common_test_config.yaml | ||
export scenario_type="arcaflow_scenarios" | ||
export scenario_file="scenarios/arcaflow/cpu-hog/input.yaml" | ||
export post_config="" | ||
envsubst < CI/config/common_test_config.yaml > CI/config/telemetry.yaml | ||
python3 -m coverage run -a run_kraken.py -c CI/config/telemetry.yaml | ||
RUN_FOLDER=`cat CI/out/test_telemetry.out | grep amazonaws.com | sed -rn "s#.*https:\/\/.*\/download/(.*)#\1#p"` | ||
$AWS_CLI s3 ls "s3://$AWS_BUCKET/$RUN_FOLDER/" | awk '{ print $4 }' > s3_remote_files | ||
echo "checking if telemetry files are uploaded on s3" | ||
cat s3_remote_files | grep events-00.json || ( echo "FAILED: events-00.json not uploaded" && exit 1 ) | ||
cat s3_remote_files | grep prometheus-00.tar || ( echo "FAILED: prometheus backup not uploaded" && exit 1 ) | ||
cat s3_remote_files | grep telemetry.json || ( echo "FAILED: telemetry.json not uploaded" && exit 1 ) | ||
echo "all files uploaded!" | ||
echo "Telemetry Collection: Success" | ||
} | ||
|
||
functional_test_telemetry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters