Created
June 14, 2019 11:10
-
-
Save karolinepauls/65ef9fbd59e646b9eace4a1366216212 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: apps/v1 | |
kind: Deployment | |
metadata: | |
name: some-deployment | |
labels: | |
app: some-app | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: some-app | |
template: | |
metadata: | |
labels: | |
app: some-app | |
spec: | |
initContainers: | |
- name: setup-app | |
image: debian:stretch-slim | |
command: | |
- bash | |
- '-c' | |
- | | |
# false # uncomment to simulate failure | |
set -euo pipefail | |
for i in {1..5}; do | |
echo "Setup doing its setuppy things" | |
sleep 1 | |
done | |
containers: | |
- name: some-app | |
image: debian:stretch-slim | |
command: | |
- bash | |
- '-c' | |
- | | |
set -euo pipefail | |
while true; do | |
echo "App doing its appy things" | |
sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment