Skip to content

fix(KustomizeUpdater): non docker.io image registries were ignored for image updates#2008

Closed
oleksandr-codefresh wants to merge 1 commit into
mainfrom
osaulyak/YOS-368-kustomize-image-registry
Closed

fix(KustomizeUpdater): non docker.io image registries were ignored for image updates#2008
oleksandr-codefresh wants to merge 1 commit into
mainfrom
osaulyak/YOS-368-kustomize-image-registry

Conversation

@oleksandr-codefresh

@oleksandr-codefresh oleksandr-codefresh commented Jun 10, 2026

Copy link
Copy Markdown

Fix for issue:
Update Argo CD Application Image Tags for kustomize apps does commit any changes during deployment if image pushed to non-default registry ( docker.io )

images:
  - name: vplakydatestregistry.azurecr.io/xeonalex/guesbook-unprivileged
    newTag: "latest"

⚠️ Does this change require a corresponding Server Change?
⚠️ If so - please add a "Requires Server Change" label to this PR!

@rain-on

rain-on commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

That test is great, exposes the problem nicely 🙏

Having looked at the code, I'm actually wondering if the real problem is ImageReplacementResult.updatedImageReferences.

Originally this field was just used for sticking into the Git commit message, and so a string was appropriate.
However, its not a FULL representation of what was changed in the file-update, as it strips out the registry data - i.e. the problem we're seeing is due to this loss of information.

I THINK I'd recommend we update the KustomizeImageReplacer to appear:
image

This would ensure we don't strip the registry data - this would also solve this problem, and probably in a nicer way ... I think.

If we went down this road, we'd probably need to apply this to all ImageReplacers, not just Kustomize.

If you wanted to go to an ever better solution - I'd change the updatedImageReferences and alreadyUpToDateImages from strings to ContainerImageReference - then we're passing back TYPED data, which makes it much safer to use in "business logic" (Rather than plain strings).

eg:
public class ImageReplacementResult(string updatedContents, HashSet<ContainerImageReference> updatedImageReferences, HashSet<ContainerImageReference> alreadyUpToDateImages, HashSet<string>? unrecognisedKinds = null)

Final thought - we probably want to apply this to 2026.2 release branch, then let TeamCity merge it forward onto main.

@oleksandr-codefresh oleksandr-codefresh deleted the osaulyak/YOS-368-kustomize-image-registry branch June 11, 2026 05:22
@oleksandr-codefresh

Copy link
Copy Markdown
Author

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.

2 participants