Skip to content

Instantly share code, notes, and snippets.

@Hugome
Created April 4, 2021 05:26
Show Gist options
  • Save Hugome/7b1b8b6b0b238d8208400f13e6319e4d to your computer and use it in GitHub Desktop.
Save Hugome/7b1b8b6b0b238d8208400f13e6319e4d to your computer and use it in GitHub Desktop.
Dapr Community Call - 06/04/2021 - Shutdown demo
apiVersion: batch/v1
kind: Job
metadata:
name: test-with-shutdown
spec:
ttlSecondsAfterFinished: 200
template:
metadata:
annotations:
dapr.io/enabled: "true"
dapr.io/app-id: "with-shutdown"
spec:
containers:
- name: job
image: busybox
imagePullPolicy: IfNotPresent
command: ["/bin/sh", "-c", "sleep 40 && wget localhost:3500/v1.0/shutdown"]
restartPolicy: Never
apiVersion: batch/v1
kind: Job
metadata:
name: test-without-shutdown
spec:
ttlSecondsAfterFinished: 200
template:
metadata:
annotations:
dapr.io/enabled: "true"
dapr.io/app-id: "without-shutdown"
spec:
containers:
- name: job
image: busybox
imagePullPolicy: IfNotPresent
command: ["/bin/sh", "-c", "sleep 40"]
restartPolicy: Never
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment