initial commit: adding app

This commit is contained in:
Simon Belmas
2024-06-24 19:24:03 +02:00
parent 9b4b61d72c
commit 18c1375be6
8 changed files with 186 additions and 0 deletions

1
config/content-git-repo Normal file
View File

@@ -0,0 +1 @@
https://github.com/amoldalwai/RoadFighter.git

35
config/init.sh Normal file
View File

@@ -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 <<EOF >index.html
<html>
<head>
<title>Html-Kube-Tester fron ${KUBE_NODE_NAME}</title>
</head>
<body>
<p align="center">
From node ${KUBE_NODE_NAME}
</p>
<iframe
id="embeddedcontent"
title="embeddedcontent"
width="100%"
height="90%"
src="./index-embedded.html" />
</body>
</html>
EOF

1
config/replicas Normal file
View File

@@ -0,0 +1 @@
2