Commit eb6823e7 authored by 智勇's avatar 智勇

还原更新镜像

parent 91a608ed
......@@ -15,7 +15,7 @@ const {
getServiceDetail,
serviceRestart,
serviceDelete,
// imageUpdate,
imageUpdate,
deployUpdate,
replicaSetDelete,
pvcDelete,
......@@ -109,13 +109,7 @@ 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(data.serviceName)) {
// await imageUpdate(ctx.client, ctx.request.body)
if (!data.label) {
data.label = data.type
}
const resources = makeResouce(data.serviceName, data.label)
data.resources = resources
await deployUpdate(ctx.cluterParams, ctx.client, data)
await imageUpdate(ctx.client, ctx.request.body)
} else {
await createService(ctx)
}
......
......@@ -31,7 +31,6 @@ module.exports = function client() {
})
let hosts = ''
ca.hosts.forEach((item) => {
console.log(item)
hosts += `${item.value}&`
})
domain[`${cluster}domain`] = {
......@@ -42,7 +41,6 @@ module.exports = function client() {
}
ctx.client = client[cluster]
ctx.cluterParams = domain[`${cluster}domain`]
console.log(ctx.cluterParams)
await next()
}
}
......
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