Last active
February 21, 2020 22:01
-
-
Save wuestkamp/9db81572ccbeff99397e02f6508b61ca to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
- > | |
touch /tmp/messaging && | |
while ! [ -f /tmp/kill_me ]; | |
do | |
cat /tmp/messaging; | |
rm /tmp/messaging && touch /tmp/messaging; | |
sleep 1; | |
done | |
image: bash | |
name: runner | |
lifecycle: | |
postStart: | |
exec: | |
command: ["sh", "-c", "echo postStart >> /tmp/messaging"] | |
preStop: | |
exec: | |
command: ["sh", "-c", "echo preStop >> /tmp/messaging && sleep 10 && touch /tmp/kill_me"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment