Skip to content

Commit

Permalink
docs: Examples for semver and digest update strategy (argoproj-labs#507)
Browse files Browse the repository at this point in the history
Proposal examples to use semver and digest update strategy
  • Loading branch information
dmouse committed Jun 8, 2023
1 parent 7b181bd commit 5366cc1
Showing 1 changed file with 45 additions and 4 deletions.
49 changes: 45 additions & 4 deletions docs/examples/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,48 @@
# Examples

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

Feel free to submit your own examples or guides to the documentation, as we do
not have access to all the registries and cloud platforms out there.
```
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: dev
annotations:
argocd-image-updater.argoproj.io/write-back-method: argocd
argocd-image-updater.argoproj.io/image-list: api=registry.com/vendor/api:latest,front=registry.com/vendor/front:latest
argocd-image-updater.argoproj.io/update-strategy: digest
---
apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
containers:
- name: app
image: registry.com/vendor/api@sha256:38089... # Initial sha
```

## semver
Using `semver` defining the `update-strategy` per `image-list`

```
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: prod
annotations:
argocd-image-updater.argoproj.io/write-back-method: argocd
argocd-image-updater.argoproj.io/image-list: api=registry.com/vendor/api:1.x,front=registry.com/vendor/front:1.x
#argocd-image-updater.argoproj.io/update-strategy: semver # to apply for all the images
argocd-image-updater.argoproj.io/api.update-strategy: semver
argocd-image-updater.argoproj.io/front.update-strategy: semver
---
apiVersion: apps/v1
kind: Deployment
spec:
template:
spec:
containers:
image: registry.com/vendor/api:1.0
```

0 comments on commit 5366cc1

Please sign in to comment.