Skip to content

Commit 321aef7

Browse files
authored
docs(crd): update Community Documentation for Installation part (#1282)
Signed-off-by: dkarpele <[email protected]>
1 parent 80494ce commit 321aef7

File tree

4 files changed

+24
-181
lines changed

4 files changed

+24
-181
lines changed

README.md

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,25 @@
99

1010
Argo CD Image Updater is a tool to automatically update the container
1111
images of Kubernetes workloads which are managed by Argo CD. In a nutshell,
12-
it will track image versions specified by annotations on the Argo CD
13-
Application resources and update them by setting parameter overrides using
14-
the Argo CD API.
12+
it uses a dedicated ImageUpdater CR to define how to track and
13+
update image versions for your Argo CD Applications. When a new image is available,
14+
it updates the application by setting parameter overrides, either through the
15+
Argo CD API or by committing changes to a Git repository.
1516

16-
Currently it will only work with applications that are built using *Kustomize*
17+
Currently, it will only work with applications that are built using *Kustomize*
1718
or *Helm* tooling. Applications built from plain YAML or custom tools are not
1819
supported yet (and maybe never will).
1920

2021
## Documentation
2122

2223
Read
2324
[the documentation](https://argocd-image-updater.readthedocs.io/en/stable/)
24-
for more information on how to setup and run Argo CD Image Updater and to get
25+
for more information on how to set up and run Argo CD Image Updater and to get
2526
known to its features and limitations.
2627

2728
Above URL points to the documentation for the current release. If you are
2829
interested in documentation of upcoming features, check out the
29-
[the latest documentation](https://argocd-image-updater.readthedocs.io/en/latest/)
30+
[latest documentation](https://argocd-image-updater.readthedocs.io/en/latest/)
3031
which is up-to-date with the master branch.
3132

3233
## Current status
@@ -37,11 +38,6 @@ yet for *critical* production workloads, but feel free to give it a spin.
3738
We're very interested in feedback on usability and the user experience as well
3839
as in bug discoveries and enhancement requests.
3940

40-
**Important note:** Until the first stable version (i.e. `v1.0`) is released,
41-
breaking changes between the releases must be expected. We will do our best
42-
to indicate all breaking changes (and how to un-break them) in the
43-
[Changelog](CHANGELOG.md)
44-
4541
## Contributing
4642

4743
You are welcome to contribute to this project by means of raising issues for
@@ -58,17 +54,14 @@ Also, if you want to contribute code, please make sure that your code
5854
* is well commented,
5955
* and last but not least is compatible with our license and CLA
6056

61-
Please note that in the current early phase of development, the code base is
62-
a fast moving target and lots of refactoring will happen constantly.
63-
6457
## License
6558

6659
`argocd-image-updater` is open source software, released under the
6760
[Apache 2.0 license](https://www.apache.org/licenses/LICENSE-2.0)
6861

6962
## Things that are planned (roadmap)
7063

71-
The following things are on the roadmap until the `v1.0` release
64+
The following things are on the roadmap
7265

7366
* [ ] Extend Argo CD functionality to be able to update images for other types
7467
of applications.

docs/contributing/development.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ important targets are:
2222

2323
* `test` - this will run all the unit tests
2424

25-
* `image` - this will build the Docker image
25+
* `docker-build` - this will build the Docker image
2626

27-
* `manifests` - this will build the installation manifests for Kubernetes from
27+
* `build-installer` - this will build the installation manifests for Kubernetes from
2828
the Kustomize sources
2929

3030
* `serve-docs` will render the documentation at localhost:8000 (requires Docker)

docs/index.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ that are managed by
1111
course to
1212
[contribute](./contributing/start.md) by many means.
1313

14-
There will be (probably a lot of) breaking changes from release to
15-
release as development progresses until version 1.0. We will do our
14+
We will do our
1615
best to indicate any breaking change and how to un-break it in the
1716
respective
1817
[release notes](https://github.com/argoproj-labs/argocd-image-updater/releases).

docs/install/installation.md

Lines changed: 13 additions & 162 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,24 @@
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
66
cluster that Argo CD is running in, however, this is not a requirement. In fact,
77
it is not even a requirement to run Argo CD Image Updater within a Kubernetes
88
cluster 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

4225
While this step is optional, we recommend to set the log level explicitly.
@@ -54,150 +37,15 @@ data:
5437
5538
If 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+
22879
Starting with v0.8.0, Argo CD Image Updater exports Prometheus-compatible
22980
metrics on a dedicated endpoint, which by default listens on TCP port 8081
23081
and serves data from `/metrics` path. This endpoint is exposed by a service

0 commit comments

Comments
 (0)