When creating Applications in Argocd I always prefer to use kustomize for my own manifests. It allows me to create a simple “base” of manifests and then alter it for the specific use case via the kustomize attribute within the application. This allows a single place (the Application or ApplicationSet) to stores all the high level information for configuring the installation.
While working on one project or another, I don’t remember anymore why I needed to figure this out, I noticed the images attribute works differently in Argocd than it does in kustomize. Since you the reader might be interested in the solution as opposed to the exploration, let me get that out of the way now:
format: - [old_image_name=]<image_name>:<image_tag>
Example:
spec:
source:
path: examples/helloWorld
repoURL: 'https://github.com/kubernetes-sigs/kustomize'
targetRevision: HEAD
kustomize:
images:
- nginx=docker.io/nginx:v1.1.2
Documentation for this syntax was hard to find, so I had to go digging through the source to find out how it should be formatted.
Kustomize is less concise than argocd, having you spell out each part. The same example above in kustomize would look like this.
images:
- name: nginx
newName: docker.io/nginx
newTag: v1.1.2