-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for namespace scenarios in prow (#134)
This will allow us to disrupt the entire service and validate recovery/health.
- Loading branch information
1 parent
a48128e
commit 72467c0
Showing
1 changed file
with
32 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
ls | ||
|
||
# Source env.sh to read all the vars | ||
source env.sh | ||
|
||
export KUBECONFIG=$KRKN_KUBE_CONFIG | ||
|
||
# cluster details | ||
echo "Printing cluster details" | ||
oc version | ||
cat $KRKN_KUBE_CONFIG | ||
oc config view | ||
echo "Printing node info" | ||
for node in $(oc get nodes | awk 'NR!=1{print $1}'); do oc get node/$node -o yaml; done | ||
|
||
source namespace-scenarios/env.sh | ||
|
||
krkn_loc=/root/kraken | ||
|
||
# Substitute config with environment vars defined | ||
envsubst < namespace_scenario.yaml.template > namespace-scenarios/namespace_scenario.yaml | ||
envsubst < config.yaml.template > namespace_config.yaml | ||
export SCENARIO_FILE="- namespace-scenarios/namespace_scenario.yaml" | ||
|
||
# Run Kraken | ||
cat namespace_config.yaml | ||
cat namespace-scenarios/namespace_scenario.yaml | ||
python3.9 $krkn_loc/run_kraken.py --config=namespace_config.yaml |