ArgoCD Image Updater
ArgoCD Image Updater is a tool to automatically update container image versions in ArgoCD applications. It monitors container registries for new image tags and updates the corresponding manifests in Git or directly in the cluster.Purpose
Image Updater enables automated deployments by:- Monitoring registries for new image versions (e.g., GitHub Container Registry)
- Updating applications automatically when new images are pushed
- Integrating with GitOps workflows to maintain declarative state
- Supporting multiple strategies (semver, latest, regex patterns)
Configuration
Fromnixidy/env/local/image-updater.nix:
Registry Configuration
The image updater is configured to monitor GitHub Container Registry (ghcr.io):- Name: GitHub Container Registry
- Prefix:
ghcr.io - API URL:
https://ghcr.io - Credentials: Stored in Kubernetes secret
ghcr-credentialsin theargocdnamespace
Deployment
Deployed via ArgoCD in theargocd namespace alongside the main ArgoCD controller.
Namespace
Helm Chart
Uses the official ArgoCD Image Updater chart from the Argoproj repository:flake.lock to ensure reproducibility.
Usage
Annotating Applications
To enable automatic image updates for an ArgoCD application, add annotations to the Application manifest:Update Strategies
| Strategy | Description | Example |
|---|---|---|
semver | Semantic versioning | v1.2.3 → v1.2.4 |
latest | Always use latest tag | latest |
digest | Update by digest | @sha256:abc... |
name | Lexical sort by name | 20240301 → 20240302 |
regex | Custom regex pattern | Match custom patterns |
Example: Semver Updates
1.0.0 → 1.0.1 → 1.1.0 but not to 2.0.0.
Example: Latest Tag
Setting Up Registry Credentials
For private registries, create a secret with registry credentials:read:packages scope for reading from GHCR.
Monitoring Image Updater
Check Image Updater Logs
View Update Status
Image Updater adds annotations to Application resources to track update status:argocd-image-updater.argoproj.io/image-last-update- Last update timestampargocd-image-updater.argoproj.io/write-back-method- How updates are applied
Write-Back Methods
Image Updater can update images in two ways:1. ArgoCD (default)
Updates the image parameter directly in ArgoCD (override):Cons: Drift from Git source
2. Git
Commits changes back to the Git repository:Cons: Requires write access to repository, slower
Integration with ApplicationSet
Image Updater works with ArgoCD ApplicationSet to manage multiple applications:Configuration Options
Update Interval
Image Updater checks for new images every 2 minutes by default. Adjust via:Log Level
Related Components
ArgoCD
GitOps continuous delivery
GitOps Architecture
Complete GitOps workflow
Manifest Generation
Nixidy manifest generation
Troubleshooting
Image Not Updating
Check these common issues:-
Registry credentials: Verify secret exists and has correct token
-
Application annotations: Ensure annotations are correct
-
Image Updater logs: Check for errors
-
Registry API: Test registry API access
Force Immediate Check
Restart the image updater to force an immediate check:Disable for Specific Application
Remove the image-updater annotations:Best Practices
- Use semver in production - Prevents unexpected breaking changes
- Test in dev first - Use
lateststrategy in dev, semver in prod - Set constraints - Use semver constraints to control update scope
- Monitor updates - Check logs regularly for update failures
- Git write-back - Use Git write-back method for production to maintain audit trail
- Limit update frequency - Avoid checking too frequently to reduce API rate limits