Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a new update strategy: manual #538

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mvazquezc
Copy link

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

Signed-off-by: Mario Vazquez <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #538 (d3df5c6) into master (f96b134) will decrease coverage by 0.29%.
The diff coverage is 36.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%) ⬇️
pkg/image/version.go 38.88% <0.00%> (-1.81%) ⬇️
pkg/argocd/update.go 68.37% <53.84%> (-1.42%) ⬇️
pkg/registry/client.go 13.51% <0.00%> (+0.14%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mvazquezc
Copy link
Author

Hello, could someone review it?

@jannfis
Copy link
Contributor

jannfis commented Jun 8, 2023

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?

@mvazquezc
Copy link
Author

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.

@mvazquezc
Copy link
Author

@jannfis what are the next steps to get this in? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants