Skip to content

Commit 40c2237

Browse files
authored
docs: Update documentation (#128)
Signed-off-by: jannfis <[email protected]>
1 parent 856bf94 commit 40c2237

File tree

2 files changed

+81
-10
lines changed

2 files changed

+81
-10
lines changed

docs/configuration/images.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,15 @@ Valid values for `secret_ref` are:
200200
named `variable_name`. This can be a variable that is i.e. bound from a
201201
secret within your pod spec.
202202

203+
* `ext:<path_to_script>` - Use credentials generated by a script. The script
204+
to execute must be specified using an absolute path, and must have the
205+
executable bit set. The script is supposed to output the credentials to be
206+
used as a single line to stdout, in the format `<username>:<password>`.
207+
Please note that the script will be executed every time Argo CD Image
208+
Updater goes to find a new version, and credentials will not be cached. If
209+
you want it to execute only once and cache credentials, you should configure
210+
this secret on the registry level instead.
211+
203212
In case of `secret` or `env`references, the data stored in the reference must
204213
be in format `<username>:<password>`
205214

docs/install/start.md

Lines changed: 72 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,68 @@ with access to any Kubernetes cluster at all.
99

1010
However, some features might not work without accessing Kubernetes.
1111

12+
## Testing beforehand
13+
14+
With v0.8.0, a new method to test your desired configuration before configuring
15+
your applications was introduced with the `argocd-image-updater test` command.
16+
17+
You can use this command from your workstation without any modifications to your
18+
Argo CD installation or applications, and without having to install the image
19+
updater in your Kubernetes cluster. The `test` command does not need to talk to
20+
Argo CD, and only needs access to your Kubernetes cluster if you need to use
21+
image pull secret stored in Kubernetes.
22+
23+
The new `test` command's main purpose is to verify the behaviour of Argo CD
24+
Image Updater on arbitrary images. For example, the most simple form of running
25+
a test is the following:
26+
27+
```shell
28+
argocd-image-updater test <image_name>
29+
```
30+
31+
For example, to see what Argo CD Image Updater would consider the latest nginx
32+
version according to semantic versioning, you can run:
33+
34+
```shell
35+
$ argocd-image-updater test nginx
36+
INFO[0000] getting image image_name=nginx registry=
37+
INFO[0002] Fetching available tags and metadata from registry image_name=nginx
38+
INFO[0004] Found 321 tags in registry image_name=nginx
39+
INFO[0004] latest image according to constraint is nginx:1.19.5
40+
```
41+
42+
To see what it would consider the latest patch version within the 1.17 release,
43+
run:
44+
45+
```shell
46+
$ argocd-image-updater test nginx --semver-constraint 1.17.X
47+
INFO[0000] getting image image_name=nginx registry=
48+
INFO[0002] Fetching available tags and metadata from registry image_name=nginx
49+
INFO[0004] Found 321 tags in registry image_name=nginx
50+
INFO[0004] latest image according to constraint is nginx:1.17.10
51+
```
52+
53+
You can also specify parameters that you would set for any given application,
54+
i.e. to use [update strategy](../../configuration/images/#update-strategies)
55+
`latest` and the registry requires [authentication](../../configuration/images/#specifying-pull-secrets),
56+
you can use additional command line options:
57+
58+
```shell
59+
$ export GITHUB_PULLSECRET="<username>:<token>"
60+
$ argocd-image-updater test docker.pkg.github.com/argoproj/argo-cd/argocd --update-strategy latest --credentials env:GITHUB_PULLSECRET
61+
INFO[0000] getting image image_name=argoproj/argo-cd/argocd registry=docker.pkg.github.com
62+
INFO[0000] Fetching available tags and metadata from registry image_name=argoproj/argo-cd/argocd
63+
INFO[0040] Found 100 tags in registry image_name=argoproj/argo-cd/argocd
64+
INFO[0040] latest image according to constraint is docker.pkg.github.com/argoproj/argo-cd/argocd:1.8.0-9fb51f7a
65+
```
66+
67+
For a complete list of available command line parameters, run
68+
`argocd-image-updater test --help`.
69+
70+
It is recommended that you read about core updating and image concepts in the
71+
[documentation](../../configuration/images/)
72+
before using this command.
73+
1274
## Prerequisites
1375

1476
Argo CD Image Updater will need access to the API of your Argo CD installation.
@@ -233,31 +295,31 @@ The following metrics are being made available:
233295

234296
* Number of applications processed (i.e. those with an annotation)
235297

236-
* `argocd_image_updater_applications_watched_total`
298+
* `argocd_image_updater_applications_watched_total`
237299

238300
* Number of images watched for new tags
239301

240-
* `argocd_image_updater_images_watched_total`
302+
* `argocd_image_updater_images_watched_total`
241303

242304
* Number of images updated (successful and failed)
243305

244-
* `argocd_image_updater_images_updated_total`
245-
* `argocd_image_updater_images_errors_total`
306+
* `argocd_image_updater_images_updated_total`
307+
* `argocd_image_updater_images_errors_total`
246308

247309
* Number of requests to Argo CD API (successful and failed)
248310

249-
* `argocd_image_updater_argocd_api_requests_total`
250-
* `argocd_image_updater_argocd_api_errors_total`
311+
* `argocd_image_updater_argocd_api_requests_total`
312+
* `argocd_image_updater_argocd_api_errors_total`
251313

252314
* Number of requests to K8s API (successful and failed)
253315

254-
* `argocd_image_updater_k8s_api_requests_total`
255-
* `argocd_image_updater_k8s_api_errors_total`
316+
* `argocd_image_updater_k8s_api_requests_total`
317+
* `argocd_image_updater_k8s_api_errors_total`
256318

257319
* Number of requests to the container registries (successful and failed)
258320

259-
* `argocd_image_updater_registry_requests_total`
260-
* `argocd_image_updater_registry_errors_total`
321+
* `argocd_image_updater_registry_requests_total`
322+
* `argocd_image_updater_registry_errors_total`
261323

262324
A (very) rudimentary example dashboard definition for Grafana is provided
263325
[here](https://github.com/argoproj-labs/argocd-image-updater/tree/master/config)

0 commit comments

Comments
 (0)