Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tke-eos
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
tke-eos
Commits
4cf235a9
Commit
4cf235a9
authored
Oct 10, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新镜像修复
parent
4aa6fbee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
service.js
app/service.js
+4
-2
service.js
kubeService/service.js
+3
-2
No files found.
app/service.js
View file @
4cf235a9
...
...
@@ -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
(
'
更新成功
'
)
})
...
...
kubeService/service.js
View file @
4cf235a9
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment