argocd-image-updater icon indicating copy to clipboard operation
argocd-image-updater copied to clipboard

Tag manifest where Argo CD App is

Open vfarcic opened this issue 4 years ago • 4 comments

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

Image updater is adding a file with images and tags into the same repo/directory where the base manifests are. That can cause issue if those manifests are in the same repo as the rest of the application. If that repo triggers a webhook that runs pipeline builds, the result can be an infinite loop. A user might push a change to the code, that triggers a pipeline build that pushes a new image tag, that triggers image updater that pushes a change to the manifests, that triggers another pipeline build, and on and on. If Argo CD application manifest is in a separate repo, that loop can be avoided by pushing image updater changes there.

See https://youtu.be/avPUQin9kzU?t=1156 for the explanation of the issue.

Describe the solution you'd like

Provide a way to push the image updater manifest to the same location where Argo CD Application manifest is, instead of the repo referenced in that manifest.

vfarcic avatar Oct 26 '21 00:10 vfarcic

Loved the video, and good point raised! Would love to see an approach to solving this problem. +1 from me sir!

jeremyruffell avatar Oct 26 '21 00:10 jeremyruffell

Worth mentioning this exact problem is noted in the ArgoCD best practices as a reason to keep the app manifests and code separated - https://argo-cd.readthedocs.io/en/stable/user-guide/best_practices/#separating-config-vs-source-code-repositories

zswanson avatar Oct 27 '21 22:10 zswanson

I feel that document is more of a justification for the specific behavior of the Image Updater than anything else. The same argument can be used to keep tests, pipelines, Dockerfile, and almost anything else away from app repos. Almost anything can be considered "clean separation" from the app code.

Now, I would not argue in favor or against that doc but rather say that it might be a good idea to be able to push Image Updater manifest next to the Argo CD Application manifest and not exclusively into the url address specified in that manifest. I do not want to say that they default behavior should be changed but, rather, that it might be good to have that as an option.

vfarcic avatar Oct 27 '21 22:10 vfarcic

As a side note, the loop is there (almost) only if using Image Updater. If the Argo CD Application manifest is in a separate repo and points to the manifests in the app repo, there is no "infinite loop" since we tend to update the Argo CD Application manifest with each release, and not the "base manifests" in the app repo.

vfarcic avatar Oct 27 '21 22:10 vfarcic