Created
January 22, 2019 19:49
-
-
Save ipedrazas/5064a211c7217bbc28dc95820a383600 to your computer and use it in GitHub Desktop.
Liveness Concourse
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
livenessProbe: | |
exec: | |
command: | |
- /bin/sh | |
- -c | |
- |- | |
FATAL_ERRORS=$( echo "${LIVENESS_PROBE_FATAL_ERRORS}" | grep -q '\S' && \ | |
grep -F "${LIVENESS_PROBE_FATAL_ERRORS}" /tmp/.liveness_probe ) | |
cp /dev/null /tmp/.liveness_probe | |
if [ ! -z "${FATAL_ERRORS}" ]; then | |
>&2 echo "Fatal error detected: ${FATAL_ERRORS}" | |
exit 1 | |
fi | |
if [ -f /tmp/.pre_start_cleanup ]; then | |
>&2 echo "Still trying to clean up before starting concourse. 'fly prune-worker -w ${HOSTNAME}' might need to be called to force cleanup." | |
exit 1 | |
fi | |
failureThreshold: 1 | |
initialDelaySeconds: 10 | |
periodSeconds: 10 | |
successThreshold: 1 | |
timeoutSeconds: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment