ArgoCD Image Updater Integration
Overview
Section titled “Overview”This guide covers integrating NORA with ArgoCD Image Updater for automated image updates in GitOps workflows.
Prerequisites
Section titled “Prerequisites”- NORA registry accessible via HTTPS with valid certificate
- ArgoCD Image Updater installed in your cluster
- DNS hostname configured for NORA (not just IP address)
Configuration
Section titled “Configuration”⚠️ Critical: Use Hostname, Not IP Address
Section titled “⚠️ Critical: Use Hostname, Not IP Address”Always configure ArgoCD Image Updater with a DNS hostname, never an IP address.
✅ Correct Configuration
Section titled “✅ Correct Configuration”# argocd-image-updater-config ConfigMapapiVersion: v1kind: ConfigMapmetadata: name: argocd-image-updater-config namespace: argocddata: registries.conf: | registries: - name: nora api_url: https://nora.example.com # ✅ Use hostname prefix: nora.example.com # ✅ Use hostname insecure: no default: yes❌ Incorrect Configuration
Section titled “❌ Incorrect Configuration”# DO NOT USE IP ADDRESSregistries: - name: nora api_url: https://10.0.202.20 # ❌ IP address causes issues prefix: 10.0.202.20 # ❌ Will create .meta tagsWhy this matters: Using IP addresses causes ArgoCD Image Updater to incorrectly track image metadata, resulting in recursive .meta tags (see Known Issues below).
Complete Setup Example
Section titled “Complete Setup Example”1. Create ConfigMap
Section titled “1. Create ConfigMap”apiVersion: v1kind: ConfigMapmetadata: name: argocd-image-updater-config namespace: argocddata: registries.conf: | registries: - name: nora api_url: https://nora.devitacademy.lab prefix: nora.devitacademy.lab insecure: no default: yes
log.level: debug # Optional: for troubleshootingApply:
kubectl apply -f argocd-image-updater-config.yaml2. Configure Application Annotations
Section titled “2. Configure Application Annotations”apiVersion: argoproj.io/v1alpha1kind: Applicationmetadata: name: myapp namespace: argocd annotations: argocd-image-updater.argoproj.io/image-list: myapp=nora.devitacademy.lab/myapp argocd-image-updater.argoproj.io/myapp.update-strategy: latest argocd-image-updater.argoproj.io/myapp.allow-tags: regexp:^[0-9a-f]{7}$spec: source: repoURL: https://gitlab.example.com/myorg/myapp-infra.git path: overlays/prod3. Restart Image Updater
Section titled “3. Restart Image Updater”kubectl rollout restart deployment argocd-image-updater -n argocd4. Verify Configuration
Section titled “4. Verify Configuration”# Check Image Updater logskubectl logs -n argocd -l app.kubernetes.io/name=argocd-image-updater -f
# Expected output:# level=info msg="Initialized registry endpoint https://nora.devitacademy.lab"Authentication
Section titled “Authentication”Option 1: No Authentication (Internal Network)
Section titled “Option 1: No Authentication (Internal Network)”If NORA runs without authentication (internal network only):
registries: - name: nora api_url: https://nora.example.com prefix: nora.example.com insecure: no # No credentials neededOption 2: Basic Authentication
Section titled “Option 2: Basic Authentication”Create secret:
kubectl create secret generic nora-creds \ --namespace argocd \ --from-literal=username=admin \ --from-literal=password=secretReference in ConfigMap:
registries: - name: nora api_url: https://nora.example.com prefix: nora.example.com credentials: secret:argocd/nora-credsOption 3: Token Authentication
Section titled “Option 3: Token Authentication”kubectl create secret generic nora-token \ --namespace argocd \ --from-literal=token=<your-token>registries: - name: nora api_url: https://nora.example.com prefix: nora.example.com credentials: secret:argocd/nora-tokenKnown Issues
Section titled “Known Issues”Issue: Recursive .meta Tags
Section titled “Issue: Recursive .meta Tags”Symptom:
Registry accumulates tags like:
latestlatest.metalatest.meta.metalatest.meta.meta.meta...Root Cause:
ArgoCD Image Updater was configured with IP address instead of hostname. When using IP addresses, Image Updater cannot properly correlate image metadata and creates recursive tracking tags.
Solution:
- Update ConfigMap to use hostname:
registries: - name: nora api_url: https://nora.example.com # Change from IP to hostname prefix: nora.example.com- Restart Image Updater:
kubectl delete pod -n argocd -l app.kubernetes.io/name=argocd-image-updater- Clean up existing .meta tags:
#!/bin/bashREGISTRY="https://nora.example.com"REPO="myapp"
# Get all .meta tagsMETA_TAGS=$(curl -s "${REGISTRY}/v2/${REPO}/tags/list" | \ jq -r '.tags[] | select(contains(".meta"))')
# Delete each .meta tagfor TAG in $META_TAGS; do # Get manifest digest DIGEST=$(curl -sI \ -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \ "${REGISTRY}/v2/${REPO}/manifests/${TAG}" | \ grep Docker-Content-Digest | awk '{print $2}' | tr -d '\r')
# Delete manifest curl -X DELETE "${REGISTRY}/v2/${REPO}/manifests/${DIGEST}" echo "Deleted ${TAG} (${DIGEST})"donePrevention:
Always use DNS hostnames in ArgoCD Image Updater configuration, never IP addresses.
Troubleshooting
Section titled “Troubleshooting”Problem: Image Updater not detecting new images
Section titled “Problem: Image Updater not detecting new images”Check:
- Verify registry configuration:
kubectl get cm argocd-image-updater-config -n argocd -o yaml- Check Image Updater logs:
kubectl logs -n argocd -l app.kubernetes.io/name=argocd-image-updater | grep nora- Test registry access from Image Updater pod:
kubectl exec -n argocd deployment/argocd-image-updater -- \ wget -O- https://nora.example.com/v2/_catalogSolution: Ensure hostname is resolvable and certificate is trusted
Problem: TLS certificate errors
Section titled “Problem: TLS certificate errors”Error:
x509: certificate signed by unknown authoritySolution:
Add CA certificate to Image Updater:
- Create ConfigMap with CA cert:
kubectl create configmap nora-ca \ --namespace argocd \ --from-file=ca.crt=/path/to/ca.crt- Mount in Image Updater deployment:
spec: template: spec: containers: - name: argocd-image-updater volumeMounts: - name: nora-ca mountPath: /etc/ssl/certs/nora-ca.crt subPath: ca.crt volumes: - name: nora-ca configMap: name: nora-ca- Restart deployment:
kubectl rollout restart deployment argocd-image-updater -n argocdProblem: Rate limit errors
Section titled “Problem: Rate limit errors”Error:
429 Too Many RequestsSolution:
Increase NORA rate limits (see Rate Limits Guide):
NORA_RATE_LIMIT_GENERAL_RPS=1000NORA_RATE_LIMIT_GENERAL_BURST=2000Image Updater polls registries frequently; ensure general limits accommodate this.
Best Practices
Section titled “Best Practices”- Always use HTTPS - Never use insecure registries in production
- Use DNS hostnames - Avoid IP addresses to prevent .meta tag issues
- Limit update frequency - Configure reasonable polling intervals
- Monitor logs - Watch for authentication or network issues
- Tag patterns - Use specific tag patterns to avoid unwanted updates
- Test in staging - Verify configuration before production deployment
Example: Complete Working Setup
Section titled “Example: Complete Working Setup”NORA Configuration
Section titled “NORA Configuration”# Docker run commanddocker run -d --name nora \ --restart unless-stopped \ -p 5000:5000 -p 4000:4000 \ -v /data/nora:/data \ -e NORA_STORAGE_PATH=/data \ -e NORA_RATE_LIMIT_GENERAL_RPS=1000 \ -e NORA_RATE_LIMIT_GENERAL_BURST=2000 \ ghcr.io/getnora-io/nora:latest serveDNS Configuration
Section titled “DNS Configuration”# /etc/hosts or DNS server10.0.202.20 nora.devitacademy.labCaddy Reverse Proxy
Section titled “Caddy Reverse Proxy”nora.devitacademy.lab:443 { tls /etc/ssl/certs/nora.crt /etc/ssl/private/nora.key reverse_proxy localhost:5000}ArgoCD Image Updater Config
Section titled “ArgoCD Image Updater Config”apiVersion: v1kind: ConfigMapmetadata: name: argocd-image-updater-config namespace: argocddata: registries.conf: | registries: - name: nora api_url: https://nora.devitacademy.lab prefix: nora.devitacademy.lab insecure: no default: yesApplication Annotation
Section titled “Application Annotation”metadata: annotations: argocd-image-updater.argoproj.io/image-list: | backend=nora.devitacademy.lab/lms-backend:latest, frontend=nora.devitacademy.lab/lms-frontend:latestResult: Image Updater successfully detects new images and updates applications without creating .meta tags.