Image Update Automation
Image Update Automation
Automatisieren Sie Deployments bei neuen Container-Images mit dem ArgoCD Image Updater.
Funktionsweise
Image Update Automation überwacht Ihre Container Registry auf neue Tags. Sobald ein neues Image verfügbar ist, aktualisiert das Tool automatisch Ihre Git-Konfiguration (Helm Values). Das schliesst die Lücke zwischen CI (Build) und CD (Deploy) und ermöglicht vollautomatische Releases ohne manuelle Git-Commits.
ArgoCD Image Updater
Natron setzt auf den ArgoCD Image Updater. Er ist nahtlos integriert und wird direkt über Annotations an der ArgoCD Application konfiguriert.
Konfiguration
1. Images definieren
Bestimmen Sie mittels image-list, welche Images überwacht werden sollen.
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.22. Rückschreiben (Write-Back)
Damit Änderungen dauerhaft sind, muss der Updater sie ins Git-Repository zurückschreiben (git commit).
metadata:
annotations:
argocd-image-updater.argoproj.io/write-back-method: git
argocd-image-updater.argoproj.io/git-branch: mainVollständiges Beispiel
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: my-app
namespace: argocd
annotations:
# Überwache Image mit Alias 'myimage'
argocd-image-updater.argoproj.io/image-list: myimage=ghcr.io/my-org/my-app:^1.0.0
# Aktualisiere den Helm-Parameter 'image.tag'
argocd-image-updater.argoproj.io/myimage.helm.image-tag: image.tag
# Committe Änderungen in Git
argocd-image-updater.argoproj.io/write-back-method: git
argocd-image-updater.argoproj.io/git-branch: main
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.0Erweiterte Filter (Regex)
Sie können Tags präzise mittels Regular Expressions filtern:
argocd-image-updater.argoproj.io/myimage.allow-tags: regexp:^v[0-9]+\.[0-9]+\.[0-9]+$