+
@@ -311,9 +313,9 @@
+
');
var oReq = new XMLHttpRequest();
oReq.open("POST", "https://" + clu_endpoint + "/kube/chaos/programming_mode?id=" + random_code, true);
@@ -379,7 +380,7 @@ function runChaosProgram() {
if (this.readyState === XMLHttpRequest.DONE && this.status === 200) {
//console.log(this.responseText);
now = new Date().toLocaleString().replace(',','')
- $('#alert_placeholder').replaceWith(alert_div + 'Executed Chaos Program at ' + now + '
');
+ $('#alert_placeholder4').replaceWith(alert_div + 'Executed Chaos Program at ' + now + '
');
}
};;
oReq.setRequestHeader("Content-Type", "application/json");
diff --git a/images/chaos-exec/Dockerfile b/images/chaos-exec/Dockerfile
index 77260d8..0c8802a 100644
--- a/images/chaos-exec/Dockerfile
+++ b/images/chaos-exec/Dockerfile
@@ -7,10 +7,15 @@ COPY requirements.txt requirements.txt
COPY requirements.txt requirements.txt
RUN /usr/local/bin/python -m pip install --upgrade pip
-RUN pip3 install -r requirements.txt
+
+RUN pip3 install "setuptools<58.0"
+RUN pip3 install opster==4.2
+#RUN pip3 install -r requirements.txt
RUN apt-get update -y && apt-get install -y curl
COPY . .
+RUN chmod 777 start.sh
+
CMD [ "bash", "start.sh" ]
diff --git a/images/chaos-exec/build.sh b/images/chaos-exec/build.sh
index 09af553..d529891 100644
--- a/images/chaos-exec/build.sh
+++ b/images/chaos-exec/build.sh
@@ -1,3 +1,4 @@
#!/bin/bash
-docker build . -t docker.io/kubeinvaders/chaos_exec:latest
+docker build . -t docker.io/luckysideburn/chaos-exec:latest
+docker push docker.io/luckysideburn/chaos-exec:latest
diff --git a/images/chaos-exec/requirements.txt b/images/chaos-exec/requirements.txt
index 01cecd1..5f8daac 100644
--- a/images/chaos-exec/requirements.txt
+++ b/images/chaos-exec/requirements.txt
@@ -1,3 +1,4 @@
+setuptools<58.0
atlassian-api-py
python-consul
elasticsearch
@@ -11,4 +12,5 @@ prometheus_client
psycopg2
pymongo
requests
-kafka
+confluent-kafka
+kafka-python
diff --git a/nginx/KubeInvaders.conf b/nginx/KubeInvaders.conf
index e179cbc..7b019b9 100644
--- a/nginx/KubeInvaders.conf
+++ b/nginx/KubeInvaders.conf
@@ -91,8 +91,7 @@ server {
namespace = string.gsub(res, "deleted_pods_total_on_", "")
metric = "deleted_namespace_pods_count{namespace=\"".. namespace .."\"}"
ngx.say(metric .. " " .. red:get(res))
- else
- ngx.say(res .. " " .. red:get(res))
+
end
end
}
@@ -158,8 +157,7 @@ server {
local okredis, errredis = red:connect("unix:/tmp/redis.sock")
local key_name = args["lang"] .. ":" .. args["name"]
- if not data == nil and not data == "" and not data == " " then
-
+ if data ~= nil then
ngx.log(ngx.ERR, "[save loadpreset] lang:" .. args["lang"] .. ", name:" .. args["name"] .. ", payload:" .. data)
red:set(key_name, data)
local res, err = red:get(key_name)
@@ -169,7 +167,6 @@ server {
else
ngx.say(args["name"] .. " has been saved.")
end
-
else
ngx.say("Error in payload sent by web interface.")
end