mirror of
https://github.com/lucky-sideburn/kubeinvaders.git
synced 2026-04-22 09:56:40 +00:00
added kube-linter
This commit is contained in:
15
scripts/kube-linter.lua
Normal file
15
scripts/kube-linter.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
ngx.header['Access-Control-Allow-Origin'] = '*'
|
||||
ngx.header['Access-Control-Allow-Methods'] = 'GET, POST, OPTIONS'
|
||||
ngx.header['Access-Control-Allow-Headers'] = 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'
|
||||
ngx.header['Access-Control-Expose-Headers'] = 'Content-Length,Content-Range';
|
||||
ngx.req.read_body()
|
||||
|
||||
local request_body = ngx.req.get_body_data()
|
||||
local arg = ngx.req.get_uri_args()
|
||||
local namespace = arg['namespace']
|
||||
|
||||
local handle = io.popen("/opt/kube-linter-parser.sh " .. namespace)
|
||||
local result = handle:read("*a")
|
||||
ngx.say(result)
|
||||
Reference in New Issue
Block a user