Skip to content

Instantly share code, notes, and snippets.

@karolinepauls
Created June 14, 2019 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karolinepauls/65ef9fbd59e646b9eace4a1366216212 to your computer and use it in GitHub Desktop.
Save karolinepauls/65ef9fbd59e646b9eace4a1366216212 to your computer and use it in GitHub Desktop.
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