Commit 561391e8 authored by xuezj's avatar xuezj

namespace不返回系统保留的

parent 9fb4af14
......@@ -8,8 +8,11 @@ let newNsKey = ''
const router = new Router();
module.exports = router
const keepNamespace = ['default', 'kube-system']
router.get('/', async (ctx) => {
const data = await ctx.cluster.namespace_get()
let data = await ctx.cluster.namespace_get()
data = data.namespaces && data.namespaces.filter(item => !keepNamespace.includes(item.name))
ctx.body = ctx.ok(data)
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment