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

Improve Application updates when write-back method is ArgoCD #965

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aaguilartablada
Copy link

When the write-back method is ArgoCD, the Image Updater sends an update to the ArgoCD Application on each iteration. No matter whether the new image has already been set or not, it always sends the update. In a situation where autoSync is disabled, this means that it continuously sends updates until somebody syncs the Application.

To reduce updates and improve resource usage, this pull request slightly changes the behavior. The Image Updater will check if the new image is already set in the Application source to apply the update or ignore it.

We have tested the changes in our ArgoCD instance to check the feature and you can see the results in the image below. Updates have been reduced. Once they are applied, updates disappear. CPU and memory usage have been improved.

Captura de pantalla 2024-12-09 a las 10 22 03

@codecov-commenter
Copy link

codecov-commenter commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 27.38095% with 61 lines in your changes missing coverage. Please review.

Project coverage is 73.61%. Comparing base (8076d20) to head (0f06fcb).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
pkg/argocd/argocd.go 15.25% 46 Missing and 4 partials ⚠️
pkg/argocd/update.go 56.00% 8 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #965      +/-   ##
==========================================
- Coverage   74.64%   73.61%   -1.04%     
==========================================
  Files          31       31              
  Lines        3913     3991      +78     
==========================================
+ Hits         2921     2938      +17     
- Misses        856      910      +54     
- Partials      136      143       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pkg/argocd/update.go Outdated Show resolved Hide resolved
pkg/argocd/update.go Outdated Show resolved Hide resolved
pkg/argocd/update.go Outdated Show resolved Hide resolved
Signed-off-by: Álvaro Aguilar-Tablada Espinosa <[email protected]>
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