argoproj-labs / argocd-image-updater

Automatic container image update for Argo CD
https://argocd-image-updater.readthedocs.io/en/stable/
Apache License 2.0
1.26k stars 259 forks source link

Allow for multiple write-back targets to be defined #243

Open Hsn723 opened 3 years ago

Hsn723 commented 3 years ago

Is your feature request related to a problem? Please describe.

Argo CD Image Updater's git write-back configuration allows to specify the location of a single kustomization file to write back to via the argocd-image-updater.argoproj.io/write-back-target annotation, however for our use case we need to be able to write back to more than one location at once.

Describe the solution you'd like Extending the argocd-image-updater.argoproj.io/write-back-target annotation to take a list of kustomization targets would resolve the use case described above. For instance:

argocd-image-updater.argoproj.io/write-back-target: "kustomization:../../ci, kustomization:../../staging"

Describe alternatives you've considered We've also considered having an instance of Argo CD Image Updater in the CI environment, however our CI runs on demand and will not pick up on changes in a timely matter. Additionally, we'd like to avoid granting additional permissions to the CI environment.

jannfis commented 3 years ago

Do you have different Argo CD applications configured for your ci and staging environments, or is the ci environment not connected with Argo CD at all, and just applies the kustomization to a cluster?

Hsn723 commented 3 years ago

@jannfis All our environment use the same Argo CD Applications with different Kustomize overlays. In CI, a new instance of Argo CD is deployed each time, along with the parent Application which in turns picks up our repository's Applications in an app-of-apps pattern.