Merge pull request #35 from mfojtik/probe

Add liveness and readiness probe
This commit is contained in:
Ben Parees 2016-02-29 11:21:58 -05:00
commit b17a07bf0a
2 changed files with 57 additions and 6 deletions

View File

@ -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}"
}
}
}
]

View File

@ -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",