argocd-image-updater icon indicating copy to clipboard operation
argocd-image-updater copied to clipboard

Recreate ArgoCD interface for accessing Argo CD functions.

Open dkarpele opened this issue 5 months ago • 0 comments

  • Change signatures and implementations for GetApplication, ListApplications, UpdateSpec for type k8sClient. These functions now rely on controller-runtime client.Client.
  • Constructor NewK8SClient was simplified.
  • ArgoCD tests were updated.
  • ListApplications misses labelSelector feature (will be added in GITOPS-7119). 
  • GetApplication misses NamePattern feature (will be added in GITOPS-7119).
  • Helpers were added to registry-scanner/pkg/log/log.go. Thanks to them, we can propagate the data through all the functions like: controller=ctrl controllerGroup=ctrlG controllerKind=ctrlK logger=lgr. It will be convenient to merge #1171 first. An error undefined: log.LoggerFromContext will disappear from "checks".
  • bin/controller-gen* were removed because they should be generated on each machine separately depending on arch, os, etc.
  • I propose to deprecate ArgoCD client. See GITOPS-7123.

Log looks like this. Have a look at logger=warmup-cache or logger=reconcile that were propagated to the respectful functions.

time="2025-06-21T18:09:22+02:00" level=info msg="argocd-image-updater v9.9.99+unknown starting [loglevel:TRACE, interval:2m0s, healthport:8080]"
time="2025-06-21T18:09:22+02:00" level=warning msg="commit message template at /app/config/commit.template does not exist, using default"
time="2025-06-21T18:09:22+02:00" level=debug msg="Successfully parsed commit message template"
time="2025-06-21T18:09:22+02:00" level=warning msg="Registry configuration at /app/config/registries.conf could not be read: stat /app/config/registries.conf: no such file or directory -- using default configuration"
time="2025-06-21T18:09:22+02:00" level=debug msg="Starting askpass server"
time="2025-06-21T18:09:22+02:00" level=info msg="ArgoCD configuration: [apiKind=kubernetes, server=argocd-server.default, auth_token=false, insecure=false, grpc_web=false, plaintext=false]"
time="2025-06-21T18:09:22+02:00" level=info msg="webhook server is disabled" controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater logger=controller-setup
time="2025-06-21T18:09:22+02:00" level=info msg="Adding cache warmer to the manager." controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater logger=controller-setup
time="2025-06-21T18:09:22+02:00" level=info msg="starting manager" controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater logger=controller-setup
time="2025-06-21T18:09:22+02:00" level=info msg="starting server" addr="[::]:8081" name="health probe"
time="2025-06-21T18:09:22+02:00" level=debug msg="Caches are synced. Warming up image cache..." controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater logger=warmup-cache
time="2025-06-21T18:09:22+02:00" level=debug msg="Listing all ImageUpdater CRs before starting manager..." controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater logger=warmup-cache
time="2025-06-21T18:09:22+02:00" level=info msg="Starting EventSource" controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater source="kind source: *v1alpha1.ImageUpdater"
time="2025-06-21T18:09:22+02:00" level=info msg="Starting Controller" controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater
time="2025-06-21T18:09:22+02:00" level=info msg="Controller runtime logger initialized." controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater logger=controller-setup setAppLogLevel=trace
time="2025-06-21T18:09:22+02:00" level=info msg="Starting workers" controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater worker count=1
time="2025-06-21T18:09:22+02:00" level=debug msg="Found 1 ImageUpdater CRs to process for cache warm-up." controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater logger=warmup-cache
time="2025-06-21T18:09:22+02:00" level=debug msg="Found CR imageupdater-sample-short, namespace=default" controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater logger=warmup-cache
time="2025-06-21T18:09:22+02:00" level=debug msg="Attempting to fetch application 'image-updater-001' in namespace 'argocd-image-updater-e2e'" controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater logger=warmup-cache
time="2025-06-21T18:09:22+02:00" level=debug msg="Reconciliation for default/imageupdater-sample-short is waiting for cache warm-up to complete..." controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater cr_name=imageupdater-sample-short cr_namespace=default logger=reconcile
time="2025-06-21T18:09:22+02:00" level=debug msg="Application 'image-updater-001' in namespace 'argocd-image-updater-e2e' found" controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater logger=warmup-cache
time="2025-06-21T18:09:22+02:00" level=debug msg="Attempting to fetch application 'image-updater-001-1' in namespace 'argocd-image-updater-e2e'" controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater logger=warmup-cache
time="2025-06-21T18:09:22+02:00" level=warning msg="Application 'image-updater-001-1' in namespace 'argocd-image-updater-e2e' specified in ImageUpdater 'imageupdater-sample-short' was not found, skipping." controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater logger=warmup-cache
time="2025-06-21T18:09:22+02:00" level=debug msg="Applications listed: 1" controller=imageupdater controllerGroup=argocd-image-updater.argoproj.io controllerKind=ImageUpdater logger=warmup-cache

dkarpele avatar Jun 21 '25 19:06 dkarpele