Commit 4cf235a9 authored by 智勇's avatar 智勇

更新镜像修复

parent 4aa6fbee
......@@ -108,7 +108,8 @@ router.post('/modifyImage', async (ctx) => {
list = list.body.items.map(item => (item.metadata.labels && item.metadata.labels['qcloud-app']) || item.metadata.name)
if (list.includes(ctx.request.body.serviceName)) {
await imageUpdate(ctx.client, ctx.request.body)
// await imageUpdate(ctx.client, ctx.request.body)
await deployUpdate(ctx.cluterParams, ctx.client, ctx.request.body)
} else {
await createService(ctx)
}
......@@ -123,7 +124,8 @@ router.post('/modifyDeploy', async (ctx) => {
}
const resources = makeResouce(data.serviceName, data.label)
data.resources = resources
await deployUpdate(ctx.cluster, ctx.client, data)
await deployUpdate(ctx.cluterParams, ctx.client, data)
// await deployUpdate(ctx.cluster, ctx.client, data)
ctx.body = ctx.ok('更新成功')
})
......
......@@ -160,8 +160,9 @@ const imageUpdate = async (client, data) => {
.patch({ body: updateObj })
}
const deployUpdate = async (cluster, client, data) => {
data.cluster = cluster
const deployUpdate = async (cluterParams, client, data) => {
data.cluster = cluterParams.cluster
data.hosts = cluterParams.hosts
const { namespace, serviceName } = data
const manifestArray = makeManifest(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