22
33## Installation methods
44
5- It is recommended to run Argo CD Image Updater in the same Kubernetes namespace
5+ It is recommended to run Argo CD Image Updater in the same Kubernetes
66cluster that Argo CD is running in, however, this is not a requirement. In fact,
77it is not even a requirement to run Argo CD Image Updater within a Kubernetes
88cluster or with access to any Kubernetes cluster at all.
99
10- However, some features might not work without accessing Kubernetes, and it is
11- strongly advised to use the first installation method.
10+ However, some features might not work without accessing Kubernetes.
1211
13- ## <a name =" install-kubernetes " ></a >Method 1: Installing as Kubernetes workload in Argo CD namespace
12+ ## <a name =" install-kubernetes " ></a >Installing as Kubernetes workload in Argo CD namespace
1413
15- The most straightforward way to run the image updater is to install it as a Kubernetes workload into the namespace where
16- Argo CD is running. Don't worry, without any configuration, it will not start messing with your workloads yet.
17-
18- !!!note
19- We also provide a Kustomize base in addition to the plain Kubernetes YAML
20- manifests. You can use it as remote base and create overlays with your
21- configuration on top of it. The remote base's URL is
22- ` https://github.com/argoproj-labs/argocd-image-updater/manifests/base ` .
23- You can view the manifests [ here] ( https://github.com/argoproj-labs/argocd-image-updater/tree/stable/manifests/base )
14+ The most straightforward way to run the image updater is to install it as a Kubernetes workload using the provided installation manifests. These manifests will set up the controller in its own dedicated namespace (` argocd-image-updater-system ` by default).
15+ Don't worry, without creating any ImageUpdater custom resources, it will not start modifying your workloads yet.
2416
2517### Apply the installation manifests
2618
2719``` shell
28- kubectl apply -n argocd - f https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/stable/manifests /install.yaml
20+ kubectl apply -f https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/stable/config /install.yaml
2921```
3022
31- !!! warning
32- The installation manifests include ` ClusterRoleBinding ` resources that reference ` argocd ` namespace. If you are installing Argo CD into a different
33- namespace then make sure to update the namespace reference.
34-
35- !!!note "A word on high availability"
36- It is not advised to run multiple replicas of the same Argo CD Image Updater
37- instance. Just leave the number of replicas at 1, otherwise weird side
38- effects could occur.
39-
4023### Configure the desired log level
4124
4225While this step is optional, we recommend to set the log level explicitly.
@@ -54,150 +37,15 @@ data:
5437
5538If you omit the ` log.level` setting, the default `info` level will be used.
5639
57- # # Method 2: Connect using Argo CD API Server
58-
59- If you are unable to install Argo CD Image Updater into the same Kubernetes
60- cluster you can configure it to use the API of your Argo CD installation.
61-
62- If you chose to install the Argo CD Image Updater outside of the cluster where
63- Argo CD is running in, the API must be exposed externally (i.e. using Ingress).
64- If you have network policies in place, make sure that Argo CD Image Updater will
65- be allowed to communicate with the Argo CD API, which is usually the service
66- ` argocd-server` in namespace `argocd` on port 443 and port 80.
67-
68- # ## Apply the manifests
69-
70- First, create a namespace and apply the manifests to your cluster
71-
72- ` ` ` shell
73- kubectl create namespace argocd-image-updater
74- kubectl apply -n argocd-image-updater -f https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/stable/manifests/install.yaml
75- ` ` `
76-
77- !!! warning
78- The installation manifests include `ClusterRoleBinding` resources that reference `argocd` namespace. If you are installing Argo CD into a different
79- namespace then make sure to update the namespace reference.
80-
81- !!!note "A word on high availability"
82- It is not advised to run multiple replicas of the same Argo CD Image Updater
83- instance. Just leave the number of replicas at 1, otherwise weird side
84- effects could occur.
85-
86- # ## Create a local user within Argo CD
87-
88- Argo CD Image Updater needs credential for accessing the Argo CD API. Using a
89- [local user](https://argoproj.github.io/argo-cd/operator-manual/user-management/)
90- is recommended, but a *project token* will work as well (although, this will
91- limit updating to the applications of the given project obviously).
92-
93- Let's use an account named `image-updater` with appropriate API permissions.
94-
95- Add the following user definition to `argocd-cm` :
96-
97- ` ` ` yaml
98- data:
99- # ...
100- accounts.image-updater: apiKey
101- ` ` `
102-
103- Now, you will need to create an access token for this user, which can be either
104- done using the CLI or the Web UI. The following CLI command will create a named
105- token for the user and print it to the console :
106-
107- ` ` ` shell
108- argocd account generate-token --account image-updater --id image-updater
109- ` ` `
110-
111- Copy the token's value somewhere, you will need it later on.
112-
113- # ## Granting RBAC permissions in Argo CD
114-
115- The technical user `image-updater` we have configured in the previous step now
116- needs appropriate RBAC permissions within Argo CD. Argo CD Image Updater needs
117- the `update` and `get` permissions on the applications you want to manage.
118-
119- A most basic version that grants `get` and `update` permissions on all of the
120- applications managed by Argo CD might look as follows :
121-
122- ` ` ` text
123- p, role:image-updater, applications, get, */*, allow
124- p, role:image-updater, applications, update, */*, allow
125- g, image-updater, role:image-updater
126- ` ` `
127-
128- You might want to strip that down to apps in a specific project, or to specific
129- apps, however.
130-
131- Put the RBAC permissions to Argo CD's `argocd-rbac-cm` ConfigMap and Argo CD will
132- pick them up automatically.
133-
134- # ## Configure Argo CD endpoint
135-
136- If you run Argo CD Image Updater in another cluster than Argo CD, or if your
137- Argo CD installation is not in namespace `argocd` or if you use a default or
138- otherwise self-signed TLS certificate for Argo CD API endpoint, you probably
139- need to divert from the default connection values.
140-
141- Edit the `argocd-image-updater-config` ConfigMap and add the following keys
142- (the values are dependent upon your environment)
143-
144- ` ` ` yaml
145- data:
146- applications_api: argocd
147- # The address of Argo CD API endpoint - defaults to argocd-server.argocd
148- argocd.server_addr: <FQDN or IP of your Argo CD server>
149- # Whether to use GRPC-web protocol instead of GRPC over HTTP/2
150- argocd.grpc_web: "true"
151- # Whether to ignore invalid TLS cert from Argo CD API endpoint
152- argocd.insecure: "false"
153- # Whether to use plain text connection (http) instead of TLS (https)
154- argocd.plaintext: "false"
155- ` ` `
156-
157- After changing values in the ConfigMap, Argo CD Image Updater needs to be
158- restarted for the changes to take effect, i.e.
159-
160- ` ` ` shell
161- kubectl -n argocd-image-updater rollout restart deployment argocd-image-updater
162- ` ` `
163-
164- # ## Configure API access token secret
165-
166- When installed from the manifests into a Kubernetes cluster, the Argo CD Image
167- Updater reads the token required for accessing Argo CD API from an environment
168- variable named `ARGOCD_TOKEN`, which is set from a field named
169- ` argocd.token` in a secret named `argocd-image-updater-secret`.
170-
171- The value for `argocd.token` should be set to the *base64 encoded* value of the
172- access token you have generated above. As a short-cut, you can use generate
173- secret with `kubectl` and apply it over the existing resource :
174-
175- ` ` ` shell
176- kubectl create secret generic argocd-image-updater-secret \
177- --from-literal argocd.token=$YOUR_TOKEN --dry-run -o yaml |
178- kubectl -n argocd-image-updater apply -f -
179- ` ` `
180-
181- You must restart the `argocd-image-updater` pod after such a change, i.e run
182-
183- ` ` ` shell
184- kubectl -n argocd-image-updater rollout restart deployment argocd-image-updater
185- ` ` `
186-
187- Or alternatively, simply delete the running pod to have it recreated by
188- Kubernetes automatically.
189-
19040# # Running locally
19141
192- As long as you have access to the Argo CD API and your Kubernetes cluster from
193- your workstation, running Argo CD Image Updater is simple. Make sure that you
194- have your API token noted and that your Kubernetes client configuration points
195- to the correct K8s cluster.
42+ As long as you have access to your Kubernetes cluster from
43+ your workstation, running Argo CD Image Updater is simple. Make sure that your
44+ Kubernetes client configuration points to the correct K8s cluster.
19645
197- Grab the binary (it does not have any external dependencies) and run :
46+ Grab the binary and run :
19847
19948` ` ` bash
200- export ARGOCD_TOKEN=<yourtoken>
20149./argocd-image-updater run \
20250 --kubeconfig ~/.kube/config
20351 --once
@@ -225,6 +73,9 @@ If opting for such an approach, you should make sure that:
22573
22674# # Metrics
22775
76+ !!!note "Under Construction"
77+ Please note that Prometheus metrics are not available in the initial CRD-based versions of Argo CD Image Updater. The functionality described below is planned for a future release. We are keeping this section as a reference for when metrics are re-introduced.
78+
22879Starting with v0.8.0, Argo CD Image Updater exports Prometheus-compatible
22980metrics on a dedicated endpoint, which by default listens on TCP port 8081
23081and serves data from `/metrics` path. This endpoint is exposed by a service
0 commit comments