ArgoCD Image Updater
Overview
ArgoCD Image Updater is a tool that automatically updates the container images of your Kubernetes applications managed by ArgoCD. It monitors the image repositories for new versions and updates the Kubernetes manifests accordingly. This is particularly useful in a development environment where developers frequently push changes with the latest
tag. ArgoCD Image Updater detects the new version and updates the manifests, triggering an automatic deployment to the development environment.
Usage
Development Environment
In a development environment, developers can push changes to their container images with the latest
tag. ArgoCD Image Updater will detect the new version of the latest
tag, update the Kubernetes manifests, and deploy the changes to the development environment automatically. This ensures that the development environment is always running the latest version of the application.
Enabling ArgoCD Image Updater
ArgoCD Image Updater is defined in the app-of-apps/values.yaml
file:
helm:
argocd-image-updater:
enabled: true
repoURL: https://argoproj.github.io/argo-helm
targetRevision: 0.11.1
chart: argocd-image-updater
namespace: argocd
To enable ArgoCD Image Updater for a platform cluster, follow these steps:
- Enable ArgoCD Image Updater: Ensure that ArgoCD Image Updater is enabled in your cluster. You can enable it in the
app-of-apps/values-PlatformName.yaml
file:
helm:
argocd-image-updater:
enabled: true
- Add Annotations to Applications: To enable ArgoCD Image Updater to update the images of an application, you need to add specific annotations to the application's manifest in
app-of-apps/values-PlatformName.yaml
. These annotations tell ArgoCD Image Updater which images to monitor and how to update them.
helm:
show-env:
enabled: true
annotations:
argocd-image-updater.argoproj.io/image-list: ghcr.io/kuberise/show-env:latest
argocd-image-updater.argoproj.io/update-strategy: digest
argocd-image-updater.argoproj.io/write-back-method: git
argocd-image-updater.argoproj.io/image-list
: Specifies the list of images to monitor. In this example, it monitors thelatest
tag of theghcr.io/kuberise/show-env
image.argocd-image-updater.argoproj.io/update-strategy
: Specifies the update strategy. Thedigest
strategy updates the image to the latest digest.argocd-image-updater.argoproj.io/write-back-method
: Specifies the method to write back the updated image tag. Thegit
method updates the image tag in the Git repository. You need to provide the Git repository token for this method. It can be provided as an input parameter in Kuberise.io install.sh script or as a kubernetes docker-registry secret. ArgoCD Image Updater will add a new file to the repository with the updated image tag.
- Change the Interval: You can change the interval at which ArgoCD Image Updater checks for new image versions by modifying the
extraArgs
in theargocd-image-updater/values.yaml
file in values folder.
extraArgs:
- --interval
- 10s
This example sets the interval to 10 seconds.
ArgoCD Image Updater is a powerful tool that automates the process of updating container images in your Kubernetes applications. By enabling it in your cluster and adding the necessary annotations to your applications, you can ensure that your development environment is always running the latest version of your applications. Additionally, by providing a Git repository token and configuring the update interval, you can customize the behavior of ArgoCD Image Updater to suit your needs.
If you decide not using ArgoCD Image Updater, you can disable it by setting the enabled
flag to false
in the app-of-apps/values-PlatformName.yaml
file and then after releasing a new version of your application, you can manually update the image tag in the application's values.yaml file and push the changes to the repository. ArgoCD will then deploy the new version of the application with the updated image tag.
For more details and further study, refer to the ArgoCD Image Updater documentation.
Nginx Ingress Controller
In the Kuberise project, the Nginx Ingress Controller is utilized to efficiently route traffic within the Kubernetes cluster and to external clients. Two instances of the ingress-nginx controller are deployed, one for internal traffic and another for external traffic.
MetalLB
MetalLB is a load-balancer implementation for on-prem Kubernetes clusters, using standard routing protocols.