Skip to content

Instantly share code, notes, and snippets.

@ipedrazas
Created January 22, 2019 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ipedrazas/5064a211c7217bbc28dc95820a383600 to your computer and use it in GitHub Desktop.
Save ipedrazas/5064a211c7217bbc28dc95820a383600 to your computer and use it in GitHub Desktop.
Liveness Concourse
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