Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions k8s/fizzbuzz.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: batch/v1
kind: Job
metadata:
name: fizzbuzz
spec:
completions: 100
parallelism: 10
completionMode: Indexed
template:
spec:
restartPolicy: Never
containers:
- name: fizzbuzz
image: debian:latest
command:
- "bash"
- "-c"
- |
if [[ "$JOB_COMPLETION_INDEX % 15" -eq 0 ]]; then
echo FizzBuzz
elif [[ "$JOB_COMPLETION_INDEX % 3" -eq 0 ]]; then
echo Fizz
elif [[ "$JOB_COMPLETION_INDEX % 5" -eq 0 ]]; then
echo Buzz
else
echo $JOB_COMPLETION_INDEX
fi