Skip to content

Commit e10cfe0

Browse files
committed
Add documented example.
Signed-off-by: Kevin McDermott <[email protected]>
1 parent ba877df commit e10cfe0

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

docs/spec/v1beta2/imageupdateautomations.md

+20
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ type TemplateData struct {
384384
Name, Namespace string
385385
}
386386
Changed update.ResultV2
387+
Values map[string]string
387388
}
388389
389390
// ResultV2 contains the file changes made during the update. It contains
@@ -481,6 +482,25 @@ There are over 70 available functions. Some of them are defined by the [Go
481482
template language](https://pkg.go.dev/text/template) itself. Most of the others
482483
are part of the [Sprig template library](http://masterminds.github.io/sprig/).
483484

485+
Additional data can be provided with `.spec.git.commit.messageTemplateValues`.
486+
487+
This is a key/value mapping with string values.
488+
489+
```yaml
490+
---
491+
apiVersion: image.toolkit.fluxcd.io/v1beta2
492+
kind: ImageUpdateAutomation
493+
metadata:
494+
name: <automation-name>
495+
spec:
496+
git:
497+
commit:
498+
messageTemplate: |-
499+
Automated image update by Flux for cluster {{ .Values.cluster }}.
500+
messageTemplateValues:
501+
cluster: prod
502+
```
503+
484504
#### Push
485505

486506
`.spec.git.push` is an optional field that specifies how the commits are pushed

0 commit comments

Comments
 (0)