From 7459fbffc5afc47ad215f4cf0d47860a2d3d8963 Mon Sep 17 00:00:00 2001 From: Eugenio Marzo Date: Sat, 14 Mar 2026 11:27:31 +0100 Subject: [PATCH] some fixes... --- Dockerfile | 18 +- html/css/style.css | 14 +- html/index.html | 118 ++++++++++- html/js/chaos_report.js | 4 +- html/js/globalvars.js | 47 ++++- html/js/kubeinvaders.js | 135 ++++++++++--- html/js/programming_mode.js | 4 +- html/js/utils.js | 358 +++++++++++++++++++++++++++++++++- nginx/KubeInvaders.conf | 113 +++++++++++ nginx/nginx.conf | 8 +- scripts/chaos-node.lua | 104 +++++++--- scripts/ingress.lua | 104 ++++++++-- scripts/metrics_loop/start.sh | 15 +- scripts/node.lua | 65 +++++- scripts/pod.lua | 71 ++++++- scripts/programming_mode.lua | 49 ++++- scripts/vm.lua | 94 +++++++-- scripts/vm_reboot.lua | 94 +++++++-- 18 files changed, 1255 insertions(+), 160 deletions(-) diff --git a/Dockerfile b/Dockerfile index ffbbe66..b83f84f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM nginx:stable +FROM openresty/openresty:1.25.3.1-4-bookworm-fat # Update repo and install some utilities and prerequisites RUN apt-get update -y @@ -9,12 +9,14 @@ RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl - RUN chmod +x ./kubectl RUN mv ./kubectl /usr/local/bin/kubectl -# Install Openresty -RUN wget -O - https://openresty.org/package/pubkey.gpg | apt-key add - -RUN codename=`grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release` && echo "deb http://openresty.org/package/debian $codename openresty" | tee /etc/apt/sources.list.d/openresty.list -RUN apt-get update -y -RUN apt-get -y install openresty -RUN chmod 777 /usr/local/openresty/nginx +# # Install Openresty +# RUN curl -fsSL https://openresty.org/package/pubkey.gpg | gpg --dearmor -o /usr/share/keyrings/openresty.gpg \ +# && echo "deb [signed-by=/usr/share/keyrings/openresty.gpg] http://openresty.org/package/debian $(. /etc/os-release && echo "$VERSION_CODENAME") openresty" \ +# > /etc/apt/sources.list.d/openresty.list + +# RUN apt-get update -y +# RUN apt-get -y install openresty +# RUN chmod 777 /usr/local/openresty/nginx # Install LUA Module RUN apt-get -y install luarocks lua-json lua-socket libyaml-dev @@ -43,7 +45,7 @@ RUN sed -i.bak 's/listen\(.*\)80;/listen 8081;/' /etc/nginx/conf.d/default.conf RUN mkdir -p /usr/local/openresty/nginx/conf/kubeinvaders/data COPY nginx/nginx.conf /etc/nginx/nginx.conf COPY nginx/KubeInvaders.conf /etc/nginx/conf.d/KubeInvaders.conf -RUN chmod g+rwx /var/cache/nginx /var/run /var/log/nginx /etc/nginx/conf.d +RUN chmod g+rwx /var/run /etc/nginx/conf.d RUN chmod 777 /var/www/html # Copy LUA scripts diff --git a/html/css/style.css b/html/css/style.css index 2d3b1d2..0a2fcf1 100644 --- a/html/css/style.css +++ b/html/css/style.css @@ -148,9 +148,17 @@ hr { } @font-face { - font-family: pixel; - src: url(".././fonts/Adore64-0vVr.ttf"); - size: 9px; + font-family: "pixel"; + src: + url("../fonts/pixel.ttf") format("truetype"), + url("../fonts/Adore64-0vVr.ttf") format("truetype"); + font-style: normal; + font-weight: 400; + font-display: swap; +} + +.pixel-font { + font-family: "pixel", "Courier New", Courier, monospace; } body { diff --git a/html/index.html b/html/index.html index 535b68a..c320c28 100644 --- a/html/index.html +++ b/html/index.html @@ -17,10 +17,13 @@