Skip to content

Conversation

@ljupchokotev
Copy link
Contributor

When updating multiple images in a Helm values file, ArgoCD would only ever update a single image. This is because the code only takes into account the new helm values from the last image that it processed ignoring the changes for the previous images.

This commit fixes that behavior. The helmNewValues var is moved outside of the for-loop that iterates over the app images. For each image, the tag is updated in the helmNewValues var.

Fixes #786

@ljupchokotev ljupchokotev force-pushed the fix-multi-image-helm branch 2 times, most recently from 2c2eb49 to d7fa6de Compare July 18, 2024 13:11
@codecov-commenter
Copy link

codecov-commenter commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.97%. Comparing base (9611c99) to head (90eae75).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #790      +/-   ##
==========================================
+ Coverage   67.84%   67.97%   +0.12%     
==========================================
  Files          31       31              
  Lines        3135     3135              
==========================================
+ Hits         2127     2131       +4     
+ Misses        860      856       -4     
  Partials      148      148              

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

@ljupchokotev ljupchokotev force-pushed the fix-multi-image-helm branch 3 times, most recently from fca9928 to 9e7d8b9 Compare July 18, 2024 13:32
When updating multiple images in a Helm values file, ArgoCD would only
ever update a single image. This is because the code only takes into
account the new helm values from the last image that it processed
ignoring the changes for the previous images.

This commit fixes that behavior. The `helmNewValues` var is moved
outside of the for-loop that iterates over the app images. For each
image, the tag is updated in the `helmNewValues` var.

Signed-off-by: Lyupcho Kotev <[email protected]>
@ljupchokotev ljupchokotev force-pushed the fix-multi-image-helm branch from 9e7d8b9 to 90eae75 Compare July 18, 2024 17:53
@ljupchokotev ljupchokotev requested a review from chengfang July 18, 2024 17:53
@chengfang chengfang merged commit fa7ae4c into argoproj-labs:master Jul 18, 2024
@chengfang
Copy link
Collaborator

@ljupchokotev thanks!

@ljupchokotev ljupchokotev deleted the fix-multi-image-helm branch July 18, 2024 18:42
sribiere-jellysmack pushed a commit to sribiere-jellysmack/argocd-image-updater that referenced this pull request Aug 13, 2024
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.

Writing image updates to helm values file doesn't work with multiple images

3 participants