Merge pull request #35 from mfojtik/probe
Add liveness and readiness probe
This commit is contained in:
commit
b17a07bf0a
2 changed files with 57 additions and 6 deletions
|
@ -189,6 +189,22 @@
|
||||||
"value": "${DATABASE_ADMIN_PASSWORD}"
|
"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": {
|
"resources": {
|
||||||
"limits": {
|
"limits": {
|
||||||
"memory": "${MEMORY_LIMIT}"
|
"memory": "${MEMORY_LIMIT}"
|
||||||
|
@ -293,6 +309,20 @@
|
||||||
"value": "${DATABASE_ADMIN_PASSWORD}"
|
"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": {
|
"resources": {
|
||||||
"limits": {
|
"limits": {
|
||||||
"memory": "${MEMORY_MONGODB_LIMIT}"
|
"memory": "${MEMORY_MONGODB_LIMIT}"
|
||||||
|
|
|
@ -167,6 +167,27 @@
|
||||||
"containerPort": 8080
|
"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": [
|
"env": [
|
||||||
{
|
{
|
||||||
"name": "DATABASE_SERVICE_NAME",
|
"name": "DATABASE_SERVICE_NAME",
|
||||||
|
|
Loading…
Add table
Reference in a new issue