Commit b6ff9bc6 authored by 智勇's avatar 智勇

创建ns增加des

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