Commit d60ce6db authored by 智勇's avatar 智勇

get_namespace_for_jenkins

parent 53599309
......@@ -13,14 +13,9 @@ router.get('/', async (ctx) => {
})
router.get('/get_namespace_for_jenkins', async (ctx) => {
const data = await ctx.cluster.namespace_get()
const data = await getAllNamespace(ctx.client)
const ret = data.namespaces.map(item => item.name)
ctx.body = ret.filter((item) => {
if (!['default', 'kube-system'].includes(item)) {
return item
}
return null
}).join('\n')
ctx.body = ret.join('\n')
})
......
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