Skip to content

Commit 5366cc1

Browse files
authored
docs: Examples for semver and digest update strategy (argoproj-labs#507)
Proposal examples to use semver and digest update strategy
1 parent 7b181bd commit 5366cc1

File tree

1 file changed

+45
-4
lines changed

1 file changed

+45
-4
lines changed

docs/examples/index.md

+45-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,48 @@
11
# Examples
22

3-
This chapter contains community contributed examples on how to configure Argo
4-
CD Image Updater for a certain registry or environment.
3+
## Digest
4+
Using `digest` sha configuration for `image-list`
55

6-
Feel free to submit your own examples or guides to the documentation, as we do
7-
not have access to all the registries and cloud platforms out there.
6+
```
7+
apiVersion: argoproj.io/v1alpha1
8+
kind: Application
9+
metadata:
10+
name: dev
11+
annotations:
12+
argocd-image-updater.argoproj.io/write-back-method: argocd
13+
argocd-image-updater.argoproj.io/image-list: api=registry.com/vendor/api:latest,front=registry.com/vendor/front:latest
14+
argocd-image-updater.argoproj.io/update-strategy: digest
15+
---
16+
apiVersion: apps/v1
17+
kind: Deployment
18+
spec:
19+
template:
20+
spec:
21+
containers:
22+
- name: app
23+
image: registry.com/vendor/api@sha256:38089... # Initial sha
24+
```
25+
26+
## semver
27+
Using `semver` defining the `update-strategy` per `image-list`
28+
29+
```
30+
apiVersion: argoproj.io/v1alpha1
31+
kind: Application
32+
metadata:
33+
name: prod
34+
annotations:
35+
argocd-image-updater.argoproj.io/write-back-method: argocd
36+
argocd-image-updater.argoproj.io/image-list: api=registry.com/vendor/api:1.x,front=registry.com/vendor/front:1.x
37+
#argocd-image-updater.argoproj.io/update-strategy: semver # to apply for all the images
38+
argocd-image-updater.argoproj.io/api.update-strategy: semver
39+
argocd-image-updater.argoproj.io/front.update-strategy: semver
40+
---
41+
apiVersion: apps/v1
42+
kind: Deployment
43+
spec:
44+
template:
45+
spec:
46+
containers:
47+
image: registry.com/vendor/api:1.0
48+
```

0 commit comments

Comments
 (0)