I recently started looking into Kustomize to organize application deployments managed through Argo CD. My planned CI flow clones a GitOps repository, changes the image tag in the environment overlay with `kustomize edit set image`, then commits and pushes the change so Argo CD can synchronize it.
The concern is that several developers could finish builds and run deployment pipelines at nearly the same time. Their jobs might all clone the repository before any of the others pushes, causing conflicting commits, rejected pushes, or one image update to overwrite another. What patterns or tools do you use to serialize these updates or otherwise handle concurrent GitOps changes safely?
2 Answers
A promotion tool such as Kargo can handle this kind of GitOps image-update workflow. It is not simply a wrapper around Kustomize; it coordinates promotions between environments and can make the update and synchronization process more structured. You would still want a clear policy for concurrent promotions, but it can remove some of the custom scripting from the pipeline.
Use deployment concurrency controls in the CI system. Configure a shared concurrency group for this application and environment so only one update job runs at a time, while later jobs wait in the queue rather than editing and pushing simultaneously. You can also add retry logic that fetches the latest branch, reapplies the image change, and pushes again if the branch moved. Be careful not to cancel newer jobs when configuring the queue.
That makes sense—serializing updates per environment should prevent the jobs from racing with each other.

So it sits above tools like Kustomize and helps coordinate releases, rather than replacing Kustomize itself?