mirror of
https://github.com/lucky-sideburn/kubeinvaders.git
synced 2026-08-23 21:46:21 +00:00
fix log tail
This commit is contained in:
@@ -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
|
||||
end
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user