Add liveness and readiness probe
This commit is contained in:
parent
933ca6638c
commit
6015715f91
2 changed files with 57 additions and 6 deletions
|
@ -189,10 +189,26 @@
|
|||
"value": "${DATABASE_ADMIN_PASSWORD}"
|
||||
}
|
||||
],
|
||||
"readinessProbe": {
|
||||
"timeoutSeconds": 3,
|
||||
"initialDelaySeconds": 3,
|
||||
"httpGet": {
|
||||
"path": "/pagecount",
|
||||
"port": 8080
|
||||
}
|
||||
},
|
||||
"livenessProbe": {
|
||||
"timeoutSeconds": 3,
|
||||
"initialDelaySeconds": 30,
|
||||
"httpGet": {
|
||||
"path": "/pagecount",
|
||||
"port": 8080
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"limits": {
|
||||
"memory": "${MEMORY_LIMIT}"
|
||||
}
|
||||
"limits": {
|
||||
"memory": "${MEMORY_LIMIT}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
@ -293,10 +309,24 @@
|
|||
"value": "${DATABASE_ADMIN_PASSWORD}"
|
||||
}
|
||||
],
|
||||
"readinessProbe": {
|
||||
"timeoutSeconds": 1,
|
||||
"initialDelaySeconds": 3,
|
||||
"exec": {
|
||||
"command": [ "/bin/sh", "-i", "-c", "mongostat --host 127.0.0.1 -u admin -p ${DATABASE_ADMIN_PASSWORD} -n 1 --noheaders"]
|
||||
}
|
||||
},
|
||||
"livenessProbe": {
|
||||
"timeoutSeconds": 1,
|
||||
"initialDelaySeconds": 30,
|
||||
"tcpSocket": {
|
||||
"port": 27017
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"limits": {
|
||||
"memory": "${MEMORY_MONGODB_LIMIT}"
|
||||
}
|
||||
"limits": {
|
||||
"memory": "${MEMORY_MONGODB_LIMIT}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -167,6 +167,27 @@
|
|||
"containerPort": 8080
|
||||
}
|
||||
],
|
||||
"readinessProbe": {
|
||||
"timeoutSeconds": 3,
|
||||
"initialDelaySeconds": 3,
|
||||
"httpGet": {
|
||||
"path": "/",
|
||||
"port": 8080
|
||||
}
|
||||
},
|
||||
"livenessProbe": {
|
||||
"timeoutSeconds": 3,
|
||||
"initialDelaySeconds": 30,
|
||||
"httpGet": {
|
||||
"path": "/",
|
||||
"port": 8080
|
||||
}
|
||||
},
|
||||
"resources": {
|
||||
"limits": {
|
||||
"memory": "${MEMORY_LIMIT}"
|
||||
}
|
||||
},
|
||||
"env": [
|
||||
{
|
||||
"name": "DATABASE_SERVICE_NAME",
|
||||
|
|
Loading…
Reference in a new issue