mirror of
https://github.com/lucky-sideburn/kubeinvaders.git
synced 2026-04-06 18:36:52 +00:00
fix nginx
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user