Commit b6ff9bc6 authored by 智勇's avatar 智勇

创建ns增加des

parent 7af962b6
......@@ -35,7 +35,7 @@ router.get('/info', async (ctx) => {
})
router.post('/create', async (ctx) => {
await ctx.cluster.namespace_create(ctx.request.body.name)
await ctx.cluster.namespace_create(ctx.request.body.name, ctx.request.body.description)
// await ctx.cluster.ingress_create(ctx.request.body.name)
ctx.body = ctx.ok()
})
......
......@@ -14,8 +14,8 @@ class Cluster extends Client {
return this.post('DescribeClusterNameSpaces', { clusterId: this.clusterId })
}
namespace_create(name) {
return this.post('CreateClusterNamespace', { name, description: '', clusterId: this.clusterId })
namespace_create(name, description) {
return this.post('CreateClusterNamespace', { name, description, clusterId: this.clusterId })
}
namespace_delete(name) {
......@@ -55,8 +55,9 @@ class Cluster extends Client {
service_modifyImage(serviceName, image, namespace) {
return this.post('ModifyClusterServiceImage', {
serviceName, namespace,
image: this.imageDomain + '/' + image,
serviceName,
namespace,
image: `${this.imageDomain}/${image}`,
clusterId: this.clusterId,
})
}
......
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