argocd-image-updater
argocd-image-updater copied to clipboard
Adds a new update strategy: manual
When running argocd-image-updater as part of a pipeline, it will be handy to be able to manually specify the image tag that you want to configure on your files.
Example:
Let's say we have a pipeline that builds our app, the resulting container image will get a tag that will match the commit id that generated that pipeline execution. Something like example-image:7b7d2504
.
Other pipelines/people may be working with that image and generating different tags, so using something like latest
strategy won't work.
I want the pipeline to update my Argo APP so as soon as the image is tagged and pushed the app gets deployed to my env. In the past, we used this tool[1].
In the pipeline, the last step will be updating the files in git with the new tag generated.
[1] https://github.com/gitops-tools/image-updater
Codecov Report
Merging #538 (d3df5c6) into master (f96b134) will decrease coverage by
0.29%
. The diff coverage is36.84%
.
@@ Coverage Diff @@
## master #538 +/- ##
==========================================
- Coverage 65.70% 65.41% -0.29%
==========================================
Files 21 21
Lines 2041 2053 +12
==========================================
+ Hits 1341 1343 +2
- Misses 571 580 +9
- Partials 129 130 +1
Impacted Files | Coverage Δ | |
---|---|---|
pkg/image/options.go | 81.59% <0.00%> (-1.02%) |
:arrow_down: |
pkg/image/version.go | 38.88% <0.00%> (-1.81%) |
:arrow_down: |
pkg/argocd/update.go | 68.37% <53.84%> (-1.42%) |
:arrow_down: |
pkg/registry/client.go | 13.51% <0.00%> (+0.14%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Hello, could someone review it?
Apologies please for coming back so late to this PR.
I was wondering the use case for manual update, because you specify a tag on the command line. Do you use Image Updater from within your CI pipeline? If yes, what is the benefit of running Image Updater in the CI vs. just comitting to the GitOps repository where your manifests are?
Apologies please for coming back so late to this PR.
I was wondering the use case for manual update, because you specify a tag on the command line. Do you use Image Updater from within your CI pipeline? If yes, what is the benefit of running Image Updater in the CI vs. just comitting to the GitOps repository where your manifests are?
@jannfis we could commit to our GitOps repository directly as you mentioned, but since image-updater already supports working with Git this just adds a new option to the tool. We may have pipelines that benefit from latest
or semver
strategies, if we could have this manual
we will be using the same tooling/process for all of them rather than ones using image-updater and others using kustomize/git commands.
@jannfis what are the next steps to get this in? Thanks!