NatronTech Logo
GitOps

Image Update Automation

Availability
Stage
Experimental
Requires

Image Update Automation

Automating image updates using ArgoCD Image Updater.

What is Image Update Automation?

Image update automation involves monitoring container registries for new image tags and automatically updating your Git configuration to reflect these changes. This closes the loop for Continuous Delivery, allowing new builds to be deployed to your cluster without manual intervention in your Git repository.

ArgoCD Image Updater

Natron uses ArgoCD Image Updater to handle image automation. It works by checking for new images in your container registry and updating the Helm parameter in your ArgoCD Application.

Configuration

Configuration is done entirely via annotations on your Application resource.

1. Define Images to Update

Use the image-list annotation to specify which images to track. Format: <alias>=<image_name>:<version_constraint>

metadata:
  annotations:
    argocd-image-updater.argoproj.io/image-list: |
      api=ghcr.io/natrontech/api:^1.0.x,
      ui=ghcr.io/natrontech/ui:~1.2

2. Configure Write Back

By default, the updater only updates the application in-memory. To persist changes to Git, configure the write-back method.

metadata:
  annotations:
    argocd-image-updater.argoproj.io/write-back-method: git
    argocd-image-updater.argoproj.io/git-branch: main

Full Example

Here is a complete example of an Application configured to auto-update the api image.

apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
  name: my-app
  namespace: argocd
  annotations:
    # 1. Track the image
    argocd-image-updater.argoproj.io/image-list: myimage=ghcr.io/my-org/my-app:^1.0.0
    # 2. Update the Helm value 'image.tag'
    argocd-image-updater.argoproj.io/myimage.helm.image-tag: image.tag
    # 3. Commit changes back to Git
    argocd-image-updater.argoproj.io/write-back-method: git
spec:
  source:
    repoURL: https://github.com/my-org/my-infra.git
    targetRevision: main
    path: charts/my-app
    helm:
      parameters:
      - name: image.tag
        value: 1.0.0

Allow Tags

You can restrict which tags are considered using regular expressions:

argocd-image-updater.argoproj.io/myimage.allow-tags: regexp:^v[0-9]+\.[0-9]+\.[0-9]+$

On this page