Skip to content

Commit c7631ed

Browse files
Luke McKechnieLuke McKechnie
authored andcommitted
fix(update-methods.md):add escaping to the template so helm doesn't consume it
1 parent 02eee1d commit c7631ed

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

docs/basics/update-methods.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ By default Argo CD Image Updater re-uses the credentials you have configured
110110
in Argo CD for accessing the repository.
111111

112112
If you don't want to use credentials configured for Argo CD you can use other credentials stored in a Kubernetes secret,
113-
which needs to be accessible by the Argo CD Image Updater's Service Account. The secret should be specified in
113+
which needs to be accessible by the Argo CD Image Updater's Service Account. The secret should be specified in
114114
`argocd-image-updater.argoproj.io/write-back-method` annotation using `git:<credref>` format. Where `<credref>` might
115115
take one of following values:
116116

@@ -161,7 +161,7 @@ kubectl -n argocd-image-updater create secret generic git-creds \
161161
By default, Argo CD Image Updater will use the value found in the Application
162162
spec at `.spec.source.repoURL` as Git repository to checkout. But when using
163163
a Helm repository as `.spec.source.repoURL` GIT will simply fail. To manually
164-
specify the repository to push the changes, specify the
164+
specify the repository to push the changes, specify the
165165
annotation `argocd-image-updater.argoproj.io/git-repository` on the Application
166166
manifest.
167167

@@ -214,8 +214,10 @@ the annotation. For example, the following would create a branch named
214214
`image-updater-foo/bar-1.1` based on `main` in the event an image with
215215
the name `foo/bar` was updated to the new tag `1.1`.
216216

217+
Helm will try to consume this template unless you escape the opening and closing brackets.
218+
217219
```yaml
218-
argocd-image-updater.argoproj.io/git-branch: main:image-updater{{range .Images}}-{{.Name}}-{{.NewTag}}{{end}}
220+
argocd-image-updater.argoproj.io/git-branch: main:image-updater{{"{{"}}range .Images{{"}}"}}-{{"{{"}}.Name{{"}}"}}-{{"{{"}}.NewTag{{"}}"}}{{"{{"}}end{{"}}"}}
219221
```
220222

221223
Alternatively, to assure unique branch names you could use the SHA1 representation of the changes:
@@ -349,7 +351,7 @@ You may also specify which kustomization to update with either a path relative t
349351

350352
```yaml
351353
argocd-image-updater.argoproj.io/write-back-target: "kustomization:../../base"
352-
# if the Application spec.source.path = config/overlays/foo, this would update the kustomization in config/base
354+
# if the Application spec.source.path = config/overlays/foo, this would update the kustomization in config/base
353355
```
354356

355357
...or absolute with respect to the repository:
@@ -374,7 +376,7 @@ You may also specify which helmvalues to update with either a path relative to t
374376

375377
```yaml
376378
argocd-image-updater.argoproj.io/write-back-target: "helmvalues:../../values.yaml"
377-
# if the Application spec.source.path = config/overlays/foo, this would update the helmvalues in config/base
379+
# if the Application spec.source.path = config/overlays/foo, this would update the helmvalues in config/base
378380
```
379381

380382
...or absolute with respect to the repository:

0 commit comments

Comments
 (0)