From e14e003aeacedd59d3202ecbc294c55130d3fc18 Mon Sep 17 00:00:00 2001 From: Eugenio Marzo Date: Sat, 2 Jan 2021 20:26:48 +0100 Subject: [PATCH] fix nginx --- nginx/KubeInvaders.templ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/KubeInvaders.templ b/nginx/KubeInvaders.templ index 1549981..53560c0 100644 --- a/nginx/KubeInvaders.templ +++ b/nginx/KubeInvaders.templ @@ -9,7 +9,7 @@ server { local arg = ngx.req.get_uri_args() ngx.req.read_body() local request_body = ngx.req.get_body_data() - os.execute("curl -XGET " .. arg['k8s_url'] .. "/api/v1/namespaces/" .. arg['namespace'] .. "/pods/" .. arg['pod_name'] .. " --header 'Authorization: Bearer " .. arg['token'] .. "' -k > /tmp/" .. arg['pod_name'] .. ".yaml" + os.execute("curl -XGET " .. arg['k8s_url'] .. "/api/v1/namespaces/" .. arg['namespace'] .. "/pods/" .. arg['pod_name'] .. " --header 'Authorization: Bearer " .. arg['token'] .. "' -k > /tmp/" .. arg['pod_name'] .. ".yaml") os.execute("/opt/kube-linter-parser.sh /tmp/" .. arg['pod_name'] .. ".yaml > /tmp/" .. arg['pod_name'] .. ".linter") local handle = io.popen('jq -R -s -c \'split("\n")\' < /tmp/' .. arg['pod_name'] .. '.linter | jq \'map(select(length > 0))\'') local result = handle:read("*a")