Add volume mount for storing k8s robot logs to the host
Issue-ID: POLICY-4546
Signed-off-by: zrrmmua <ramesh.murugan.iyer@est.tech>
Change-Id: I498aa9db39d6b04e685a893c9bca41c6bb108265
diff --git a/csit/run-k8s-csit.sh b/csit/run-k8s-csit.sh
index e348ca8..22a67f9 100755
--- a/csit/run-k8s-csit.sh
+++ b/csit/run-k8s-csit.sh
@@ -36,6 +36,7 @@
export PROJECT=""
export ROBOT_FILE=""
+export ROBOT_LOG_DIR=${PWD}/archives
export READINESS_CONTAINERS=()
function spin_microk8s_cluster () {
@@ -54,7 +55,7 @@
echo "Microk8s cluster installed successfully"
sudo usermod -a -G microk8s $USER
echo "Enabling DNS and helm3 plugins"
- microk8s.enable dns helm3
+ microk8s.enable dns helm3 hostpath-storage
echo "Creating configuration file for Microk8s"
microk8s kubectl config view --raw > $HOME/.kube/config
chmod 600 $HOME/.kube/config
@@ -93,7 +94,7 @@
rm -rf tests/models/
echo "---------------------------------------------"
echo "Installing Robot framework pod for running CSIT"
- microk8s helm install csit-robot robot --set robot=$ROBOT_FILE --set "readiness={${READINESS_CONTAINERS[*]}}";
+ microk8s helm install csit-robot robot --set robot=$ROBOT_FILE --set "readiness={${READINESS_CONTAINERS[*]}}" --set robotLogDir=$ROBOT_LOG_DIR;
print_robot_log
fi
}