diff --git a/scripts/chaos-containers.lua b/scripts/chaos-containers.lua index 88de915..98e598d 100644 --- a/scripts/chaos-containers.lua +++ b/scripts/chaos-containers.lua @@ -39,8 +39,8 @@ elseif ngx.var.request_method == "POST" and action == "enabled_logs_tail" then red:set("logs_enabled", "1") ngx.say("New container definition has been saved in Redis") return ngx.exit(ngx.status) -elseif ngx.var.request_method == "POST" and action == "disabled_logs_tail" then +elseif ngx.var.request_method == "GET" and action == "disable_logs_tail" then red:set("logs_enabled", "0") ngx.say("New container definition has been saved in Redis") return ngx.exit(ngx.status) -end \ No newline at end of file +end diff --git a/scripts/logs_loop/start.py b/scripts/logs_loop/start.py index 6d6fd0a..09b7f75 100644 --- a/scripts/logs_loop/start.py +++ b/scripts/logs_loop/start.py @@ -49,7 +49,7 @@ namespace = "kubeinvaders" while True: webtail_pods = [] final_pod_list = [] - if r.exists("log_pod_regex") and r.exists('logs_enabled') + if r.exists("log_pod_regex") and r.exists('logs_enabled'): if r.get("logs_enabled") == 1: logging.info("Found regex log_pod_regex in Redis. Logs from all pods should be collected") log_pod_regex = r.get("log_pod_regex")