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
c1f905ea
Commit
c1f905ea
authored
Jul 01, 2019
by
薛智杰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'health' into 'master'
健康检查支持定制 See merge request !32
parents
5a4c7af6
780434fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
index.js
config/index.js
+3
-0
service.js
kubeService/service.js
+8
-2
No files found.
config/index.js
View file @
c1f905ea
...
...
@@ -10,5 +10,8 @@ module.exports = {
imageDomain
:
'
ccr.ccs.tencentyun.com
'
,
path
:
'
/v2/index.php
'
,
domain
:
'
.lkbang.com
'
,
noHealthCheckApp
:
[
'
acs-batch
'
,
'
acs-quartz
'
,
'
acs-service
'
,
'
pcm
'
,
'
talos
'
,
'
app-server
'
]
}
kubeService/service.js
View file @
c1f905ea
...
...
@@ -6,6 +6,7 @@ const moment = require('moment')
const
yaml
=
require
(
'
js-yaml
'
)
const
logger
=
require
(
'
koa-log4
'
).
getLogger
(
'
kubeService
'
)
const
yamls
=
require
(
'
../yamls
'
)
const
APP_CONFIG
=
require
(
'
../config
'
)
const
client
=
new
Client
({
config
:
config
.
fromKubeconfig
(
...
...
@@ -51,8 +52,13 @@ const serviceCreate = async (data) => {
break
;
case
'
Deployment
'
:
logger
.
info
(
'
创建deploy
'
,
JSON
.
stringify
(
jsonObj
))
await
client
.
apis
.
apps
.
v1beta1
.
namespaces
(
namespace
).
deployments
.
post
({
body
:
jsonObj
})
let
obj
=
jsonObj
if
(
APP_CONFIG
.
noHealthCheckApp
.
includes
(
serviceName
))
{
obj
=
_
.
omit
(
jsonObj
,
[
'
spec.template.spec.containers[0].readinessProbe
'
])
}
logger
.
info
(
'
创建deploy
'
,
serviceName
,
JSON
.
stringify
(
obj
))
await
client
.
apis
.
apps
.
v1beta1
.
namespaces
(
namespace
).
deployments
.
post
({
body
:
obj
})
break
;
case
'
PersistentVolumeClaim
'
:
...
...
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