Last active
March 2, 2020 18:40
-
-
Save wuestkamp/5ad91782dad2477247deb64dab45cef8 to your computer and use it in GitHub Desktop.
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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: runner | |
spec: | |
terminationGracePeriodSeconds: 3600 # one hour! | |
containers: | |
- command: | |
- sh | |
- -c | |
- > | |
while ! [ -f /tmp/stop_runner ]; | |
do | |
/bin/worker --message-count=1 --timeout=1m | |
done | |
image: bash | |
name: runner | |
lifecycle: | |
preStop: | |
exec: | |
command: ["sh", "-c", "touch /tmp/stop_runner"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment