diff --git a/README.md b/README.md index f472177..6303ffb 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,10 @@ # html-kube-tester +Workload to test application behavior while making changes on infrastructure. + +Ingress is not included and have to be added on top. +Feel free to customize *replicas* and *content-git-repo* in *config* folder. + +Git will be displayed in an iframe with node name on top. + +Thanks to https://github.com/amoldalwai/RoadFighter.git for having something fun to display. diff --git a/config/content-git-repo b/config/content-git-repo new file mode 100644 index 0000000..c463c5f --- /dev/null +++ b/config/content-git-repo @@ -0,0 +1 @@ +https://github.com/amoldalwai/RoadFighter.git \ No newline at end of file diff --git a/config/init.sh b/config/init.sh new file mode 100644 index 0000000..2d6f8b3 --- /dev/null +++ b/config/init.sh @@ -0,0 +1,35 @@ +#!/bin/sh +git_retries=20 +try=0 +export GIT_SSH_COMMAND='ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"' +until timeout 10 git clone --recurse-submodules ${CONTENT_GIT_REPO} /app ; do + echo "Retry git pull after error ($try / $git_retries)" + try=$((try+1)) + if [ $try -eq $git_retries ]; then + exit 1 + fi + sleep 1 +done +cd /app +if [ -e index.html ] ; then + mv index.html index-embedded.html +fi +cat <index.html + + + Html-Kube-Tester fron ${KUBE_NODE_NAME} + + +

+ From node ${KUBE_NODE_NAME} +

+