Commit e3d6a886 authored by 智勇's avatar 智勇

livenessProbe

parent 760317f5
......@@ -110,6 +110,7 @@ const serviceCreate = async (cluterParams, client, data) => {
case 'Deployment':
if (APP_CONFIG.noHealthCheckApp.includes(serviceName)) {
manifest = _.omit(manifest, ['spec.template.spec.containers[0].readinessProbe'])
manifest = _.omit(manifest, ['spec.template.spec.containers[0].livenessProbe'])
}
logger.info('创建deploy', serviceName, JSON.stringify(manifest))
......@@ -167,7 +168,11 @@ const deployUpdate = async (cluterParams, client, data) => {
const manifestArray = makeManifest(data)
for (const item of manifestArray) {
const manifest = yaml.load(item);
let manifest = yaml.load(item);
if (APP_CONFIG.noHealthCheckApp.includes(serviceName)) {
manifest = _.omit(manifest, ['spec.template.spec.containers[0].readinessProbe'])
manifest = _.omit(manifest, ['spec.template.spec.containers[0].livenessProbe'])
}
if (manifest.kind === 'Deployment') {
logger.info('更新deploy:', JSON.stringify(manifest))
await client.apis.apps.v1beta1.namespaces(namespace)
......
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