Skip to content

Commit

Permalink
adding pod network run script
Browse files Browse the repository at this point in the history
Signed-off-by: Paige Rubendall <[email protected]>
  • Loading branch information
paigerube14 authored and chaitanyaenr committed Jan 25, 2024
1 parent 54e317e commit 845267b
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions pod-network-chaos/prow_run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/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 pod-network-chaos/env.sh

krn_loc=/root/kraken

# Substitute config with environment vars defined
if [[ -z $NAMESPACE ]]; then
echo "Requires NAMASPACE parameter to be set, please check"
exit 1
fi
envsubst < pod_network_scenario.yaml.template > pod_network_scenario.yaml
export SCENARIO_FILE=pod-network-chaos/pod_network_scenario.yaml
envsubst < config.yaml.template > pod_network_scenario_config.yaml

cat pod_network_scenario_config.yaml
cat pod-network-chaos/pod_network_scenario.yaml

python3.9 $krn_loc/run_kraken.py --config=pod_network_scenario_config.yaml

0 comments on commit 845267b

Please sign in to comment.