@@ -18,15 +18,18 @@ type ImageUpdateAutomationSpec struct {
1818 // ready to make changes.
1919 // +required
2020 Checkout GitCheckoutSpec ` json:"checkout"`
21+
2122 // Interval gives an lower bound for how often the automation
2223 // run should be attempted.
2324 // +required
2425 Interval metav1.Duration ` json:"interval"`
26+
2527 // Update gives the specification for how to update the files in
2628 // the repository. This can be left empty, to use the default
2729 // value.
2830 // +kubebuilder:default={"strategy":"Setters"}
2931 Update *UpdateStrategy ` json:"update,omitempty"`
32+
3033 // Commit specifies how to commit to the git repository.
3134 // +required
3235 Commit CommitSpec ` json:"commit"`
@@ -132,13 +135,19 @@ type CommitSpec struct {
132135 // AuthorName gives the name to provide when making a commit
133136 // +required
134137 AuthorName string ` json:"authorName"`
138+
135139 // AuthorEmail gives the email to provide when making a commit
136140 // +required
137141 AuthorEmail string ` json:"authorEmail"`
142+
138143 // MessageTemplate provides a template for the commit message,
139144 // into which will be interpolated the details of the change made.
140145 // +optional
141146 MessageTemplate string ` json:"messageTemplate,omitempty"`
147+
148+ // SigningKey provides the option to sign commits with a GPG key
149+ // +optional
150+ SigningKey *SigningKey ` json:"signingKey,omitempty"`
142151}
143152```
144153
@@ -167,6 +176,23 @@ spec:
167176 [ci skip]
168177` ` `
169178
179+ The `signingKey` field holds the reference to a secret that contains a `git.asc`
180+ key corresponding to the ASCII Armored file containing the GPG signing keypair as the value.
181+ For example,
182+
183+ ` ` ` yaml
184+ spec:
185+ commit:
186+ authorName: Fluxbot
187+ 188+ signingKey:
189+ secretRef:
190+ name: gpg-private-key
191+ ` ` `
192+
193+ will result in commits with the author `Fluxbot <[email protected] >` signed with the GPG key 194+ present in the `gpg-private-key` secret.
195+
170196# ## Commit template data
171197
172198The message template is a [Go text template][go-text-template]. The data available to the template
0 commit comments