Batch pipeline, mission 5 of 6
Pile-up
advanced, about 10 minutes, in the Kubernetes Simulator
Opens once you pass Every night.
The briefing
The inventory sync is scheduled every minute, but lately each run takes two and a half. Kubernetes' default is to start the next run anyway — so runs pile up on top of each other, fighting over the same rows.
A CronJob's concurrencyPolicy decides what happens when a run is due and the last one hasn't finished: Allow (the default) starts another, Forbid skips this one, Replace stops the old run and starts fresh.
What you'll do
- Stop runs overlapping: set concurrencyPolicy on sync
- At most one sync run active
- Bonus star: Cap how long any run may take: activeDeadlineSeconds on the job template
The mission checks the cluster, not your keystrokes: any fix that works, passes.