Skip to content

Commit 4e3c0e0

Browse files
committed
Promote ImageUpdateAutomation API to v1 (GA)
Signed-off-by: Stefan Prodan <[email protected]>
1 parent e6a8b01 commit 4e3c0e0

39 files changed

+2575
-933
lines changed

.goreleaser.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ builds:
66
release:
77
extra_files:
88
- glob: config/release/*.yaml
9-
prerelease: "true"
9+
prerelease: "auto"
1010
header: |
1111
## Changelog
1212

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ manifests: controller-gen ## Generate manifests e.g. CRD, RBAC etc.
127127
cd api; $(CONTROLLER_GEN) $(CRD_OPTIONS) rbac:roleName=manager-role paths="./..." output:crd:artifacts:config="../config/crd/bases"
128128

129129
api-docs: gen-crd-api-reference-docs ## Generate API reference documentation
130-
$(GEN_CRD_API_REFERENCE_DOCS) -api-dir=./api/v1beta2 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/v1beta2/image-automation.md
130+
$(GEN_CRD_API_REFERENCE_DOCS) -api-dir=./api/v1 -config=./hack/api-docs/config.json -template-dir=./hack/api-docs/template -out-file=./docs/api/v1/image-automation.md
131131

132132
tidy: ## Run go mod tidy
133133
cd api; rm -f go.sum; go mod tidy -compat=1.25

PROJECT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ repo: github.com/fluxcd/image-automation-controller
33
resources:
44
- group: image
55
kind: ImageUpdateAutomation
6-
version: v1beta1
6+
version: v1
77
- group: image
88
kind: ImageUpdateAutomation
99
version: v1beta2

README.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,37 @@
1-
# Image automation controller
1+
# image-automation-controller
22

33
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4789/badge)](https://bestpractices.coreinfrastructure.org/projects/4789)
44
[![report](https://goreportcard.com/badge/github.com/fluxcd/image-automation-controller)](https://goreportcard.com/report/github.com/fluxcd/image-automation-controller)
55
[![license](https://img.shields.io/github/license/fluxcd/image-automation-controller.svg)](https://github.com/fluxcd/image-automation-controller/blob/main/LICENSE)
66
[![release](https://img.shields.io/github/release/fluxcd/image-automation-controller/all.svg)](https://github.com/fluxcd/image-automation-controller/releases)
77

8-
This controller automates updates to YAML when new container images
9-
are available.
8+
The image-automation-controller is a [GitOps toolkit](https://fluxcd.io/flux/components/) controller
9+
that extends [Flux](https://github.com/fluxcd/flux2) with automated patch and commit capabilities for container image updates.
1010

11-
Its sibling,
12-
[image-reflector-controller](https://github.com/fluxcd/image-reflector-controller),
13-
scans container image repositories and reflects the metadata in
14-
Kubernetes resources. This controller reacts to that image metadata by
15-
updating YAML files in a git repository, and committing the changes.
11+
![overview](https://fluxcd.io/img/image-update-automation.png)
1612

17-
## How to install it
13+
The [image-reflector-controller](https://github.com/fluxcd/image-reflector-controller) and image-update-automation
14+
work together to update Git repositories when new container images are available.
1815

19-
Please see the [installation and use
20-
guide](https://fluxcd.io/flux/guides/image-update/).
16+
- The image-reflector-controller scans image repositories and reflects the image metadata in Kubernetes resources.
17+
- The image-automation-controller updates YAML files based on the latest images scanned, and commits the changes to a given Git repository.
2118

22-
## How to work on it
19+
## API Specification
2320

24-
For additional information on dependecies and how to contribute
25-
please refer to [DEVELOPMENT.md](DEVELOPMENT.md).
21+
| Kind | API Version |
22+
|-----------------------------------------------------------------|------------------------------|
23+
| [ImageUpdateAutomation](docs/spec/v1/imageupdateautomations.md) | `image.toolkit.fluxcd.io/v1` |
24+
25+
## Guides
26+
27+
* [Get started with Flux](https://fluxcd.io/flux/get-started/)
28+
* [Automate image updates to Git](https://fluxcd.io/flux/guides/image-update/)
29+
30+
## Roadmap
31+
32+
The roadmap for the Flux family of projects can be found at <https://fluxcd.io/roadmap/>.
33+
34+
## Contributing
35+
36+
This project is Apache 2.0 licensed and accepts contributions via GitHub pull requests.
37+
To start contributing please see the [development guide](DEVELOPMENT.md).

api/go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ module github.com/fluxcd/image-automation-controller/api
33
go 1.25.0
44

55
require (
6-
github.com/fluxcd/pkg/apis/meta v1.20.0
7-
github.com/fluxcd/source-controller/api v1.6.2
6+
github.com/fluxcd/pkg/apis/meta v1.21.0
7+
github.com/fluxcd/source-controller/api v1.7.0
88
k8s.io/apimachinery v0.34.0
9-
sigs.k8s.io/controller-runtime v0.22.0
9+
sigs.k8s.io/controller-runtime v0.22.1
1010
)
1111

1212
require (
13-
github.com/fluxcd/pkg/apis/acl v0.7.0 // indirect
13+
github.com/fluxcd/pkg/apis/acl v0.9.0 // indirect
1414
github.com/fxamacker/cbor/v2 v2.9.0 // indirect
1515
github.com/go-logr/logr v1.4.3 // indirect
1616
github.com/gogo/protobuf v1.3.2 // indirect
@@ -23,8 +23,8 @@ require (
2323
github.com/stretchr/testify v1.11.1 // indirect
2424
github.com/x448/float16 v0.8.4 // indirect
2525
go.yaml.in/yaml/v2 v2.4.2 // indirect
26-
golang.org/x/net v0.43.0 // indirect
27-
golang.org/x/text v0.28.0 // indirect
26+
golang.org/x/net v0.44.0 // indirect
27+
golang.org/x/text v0.29.0 // indirect
2828
gopkg.in/inf.v0 v0.9.1 // indirect
2929
k8s.io/klog/v2 v2.130.1 // indirect
3030
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d // indirect

api/go.sum

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
22
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
44
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5-
github.com/fluxcd/pkg/apis/acl v0.7.0 h1:dMhZJH+g6ZRPjs4zVOAN9vHBd1DcavFgcIFkg5ooOE0=
6-
github.com/fluxcd/pkg/apis/acl v0.7.0/go.mod h1:uv7pXXR/gydiX4MUwlQa7vS8JONEDztynnjTvY3JxKQ=
7-
github.com/fluxcd/pkg/apis/meta v1.20.0 h1:l9h0kWoDZTcYV0WJkFMgDXq6Q4tSojrJ+bHpFJSsaW0=
8-
github.com/fluxcd/pkg/apis/meta v1.20.0/go.mod h1:XUAEUgT4gkWDAEN79E141tmL+v4SV50tVZ/Ojpc/ueg=
9-
github.com/fluxcd/source-controller/api v1.6.2 h1:UmodAeqLIeF29HdTqf2GiacZyO+hJydJlepDaYsMvhc=
10-
github.com/fluxcd/source-controller/api v1.6.2/go.mod h1:ZJcAi0nemsnBxjVgmJl0WQzNvB0rMETxQMTdoFosmMw=
5+
github.com/fluxcd/pkg/apis/acl v0.9.0 h1:wBpgsKT+jcyZEcM//OmZr9RiF8klL3ebrDp2u2ThsnA=
6+
github.com/fluxcd/pkg/apis/acl v0.9.0/go.mod h1:TttNS+gocsGLwnvmgVi3/Yscwqrjc17+vhgYfqkfrV4=
7+
github.com/fluxcd/pkg/apis/meta v1.21.0 h1:R+bN02chcs0HUmyVDQhqe/FHmYLjipVDMLnyYfNX850=
8+
github.com/fluxcd/pkg/apis/meta v1.21.0/go.mod h1:XUAEUgT4gkWDAEN79E141tmL+v4SV50tVZ/Ojpc/ueg=
9+
github.com/fluxcd/source-controller/api v1.7.0 h1:y6vjvbkIN4JzianhmaJqujeghVpvQn3gcsVW/f1xMeA=
10+
github.com/fluxcd/source-controller/api v1.7.0/go.mod h1:UOIEs9AACxPW7fQFqGWw1/FN2QqYDLG6WkvPIyscHkw=
1111
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
1212
github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
1313
github.com/go-logr/logr v1.4.3 h1:CjnDlHq8ikf6E492q6eKboGOC0T8CDaOvkHCIg8idEI=
@@ -65,26 +65,26 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
6565
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
6666
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
6767
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
68-
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
69-
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
68+
golang.org/x/net v0.44.0 h1:evd8IRDyfNBMBTTY5XRF1vaZlD+EmWx6x8PkhR04H/I=
69+
golang.org/x/net v0.44.0/go.mod h1:ECOoLqd5U3Lhyeyo/QDCEVQ4sNgYsqvCZ722XogGieY=
7070
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
7171
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
7272
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
7373
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
7474
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
7575
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
76-
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
77-
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
76+
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
77+
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
7878
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
7979
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
80-
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
81-
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
80+
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
81+
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
8282
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
8383
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
8484
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
8585
golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
86-
golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0=
87-
golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw=
86+
golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg=
87+
golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s=
8888
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
8989
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
9090
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -104,8 +104,8 @@ k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk=
104104
k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE=
105105
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d h1:wAhiDyZ4Tdtt7e46e9M5ZSAJ/MnPGPs+Ki1gHw4w1R0=
106106
k8s.io/utils v0.0.0-20250820121507-0af2bda4dd1d/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
107-
sigs.k8s.io/controller-runtime v0.22.0 h1:mTOfibb8Hxwpx3xEkR56i7xSjB+nH4hZG37SrlCY5e0=
108-
sigs.k8s.io/controller-runtime v0.22.0/go.mod h1:FwiwRjkRPbiN+zp2QRp7wlTCzbUXxZ/D4OzuQUDwBHY=
107+
sigs.k8s.io/controller-runtime v0.22.1 h1:Ah1T7I+0A7ize291nJZdS1CabF/lB4E++WizgV24Eqg=
108+
sigs.k8s.io/controller-runtime v0.22.1/go.mod h1:FwiwRjkRPbiN+zp2QRp7wlTCzbUXxZ/D4OzuQUDwBHY=
109109
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730 h1:IpInykpT6ceI+QxKBbEflcR5EXP7sU1kvOlxwZh5txg=
110110
sigs.k8s.io/json v0.0.0-20250730193827-2d320260d730/go.mod h1:mdzfpAEoE6DHQEN0uh9ZbOCuHbLK5wOm7dK4ctXE9Tg=
111111
sigs.k8s.io/randfill v1.0.0 h1:JfjMILfT8A6RbawdsK2JXGBR5AQVfd+9TbzrlneTyrU=

api/v1/condition_types.go

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
Copyright 2025 The Flux authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1
18+
19+
const (
20+
// InvalidUpdateStrategyReason represents an invalid image update strategy
21+
// configuration.
22+
InvalidUpdateStrategyReason string = "InvalidUpdateStrategy"
23+
24+
// InvalidSourceConfigReason represents an invalid source configuration.
25+
InvalidSourceConfigReason string = "InvalidSourceConfiguration"
26+
27+
// SourceManagerFailedReason represents a failure in the SourceManager which
28+
// manages the source.
29+
SourceManagerFailedReason string = "SourceManagerFailed"
30+
31+
// GitOperationFailedReason represents a failure in Git source operation.
32+
GitOperationFailedReason string = "GitOperationFailed"
33+
34+
// UpdateFailedReason represents a failure during source update.
35+
UpdateFailedReason string = "UpdateFailed"
36+
37+
// InvalidPolicySelectorReason represents an invalid policy selector.
38+
InvalidPolicySelectorReason string = "InvalidPolicySelector"
39+
40+
// RemovedTemplateFieldReason represents usage of removed template field.
41+
RemovedTemplateFieldReason string = "RemovedTemplateField"
42+
)

api/v1/doc.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
Copyright 2025 The Flux authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// Package v1 contains API types for the image API group, version
18+
// v1. The types here are concerned with automated updates to
19+
// git, based on metadata from OCI image registries gathered by the
20+
// image-reflector-controller.
21+
//
22+
// +kubebuilder:object:generate=true
23+
// +groupName=image.toolkit.fluxcd.io
24+
package v1

api/v1/git.go

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
/*
2+
Copyright 2025 The Flux authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1
18+
19+
import (
20+
"github.com/fluxcd/pkg/apis/meta"
21+
sourcev1 "github.com/fluxcd/source-controller/api/v1"
22+
)
23+
24+
type GitSpec struct {
25+
// Checkout gives the parameters for cloning the git repository,
26+
// ready to make changes. If not present, the `spec.ref` field from the
27+
// referenced `GitRepository` or its default will be used.
28+
// +optional
29+
Checkout *GitCheckoutSpec `json:"checkout,omitempty"`
30+
31+
// Commit specifies how to commit to the git repository.
32+
// +required
33+
Commit CommitSpec `json:"commit"`
34+
35+
// Push specifies how and where to push commits made by the
36+
// automation. If missing, commits are pushed (back) to
37+
// `.spec.checkout.branch` or its default.
38+
// +optional
39+
Push *PushSpec `json:"push,omitempty"`
40+
}
41+
42+
// HasRefspec returns if the GitSpec has a Refspec.
43+
func (gs GitSpec) HasRefspec() bool {
44+
if gs.Push == nil {
45+
return false
46+
}
47+
return gs.Push.Refspec != ""
48+
}
49+
50+
type GitCheckoutSpec struct {
51+
// Reference gives a branch, tag or commit to clone from the Git
52+
// repository.
53+
// +required
54+
Reference sourcev1.GitRepositoryRef `json:"ref"`
55+
}
56+
57+
// CommitSpec specifies how to commit changes to the git repository
58+
type CommitSpec struct {
59+
// Author gives the email and optionally the name to use as the
60+
// author of commits.
61+
// +required
62+
Author CommitUser `json:"author"`
63+
// SigningKey provides the option to sign commits with a GPG key
64+
// +optional
65+
SigningKey *SigningKey `json:"signingKey,omitempty"`
66+
// MessageTemplate provides a template for the commit message,
67+
// into which will be interpolated the details of the change made.
68+
// Note: The `Updated` template field has been removed. Use `Changed` instead.
69+
// +optional
70+
MessageTemplate string `json:"messageTemplate,omitempty"`
71+
72+
// MessageTemplateValues provides additional values to be available to the
73+
// templating rendering.
74+
// +optional
75+
MessageTemplateValues map[string]string `json:"messageTemplateValues,omitempty"`
76+
}
77+
78+
type CommitUser struct {
79+
// Name gives the name to provide when making a commit.
80+
// +optional
81+
Name string `json:"name,omitempty"`
82+
// Email gives the email to provide when making a commit.
83+
// +required
84+
Email string `json:"email"`
85+
}
86+
87+
// SigningKey references a Kubernetes secret that contains a GPG keypair
88+
type SigningKey struct {
89+
// SecretRef holds the name to a secret that contains a 'git.asc' key
90+
// corresponding to the ASCII Armored file containing the GPG signing
91+
// keypair as the value. It must be in the same namespace as the
92+
// ImageUpdateAutomation.
93+
// +required
94+
SecretRef meta.LocalObjectReference `json:"secretRef,omitempty"`
95+
}
96+
97+
// PushSpec specifies how and where to push commits.
98+
type PushSpec struct {
99+
// Branch specifies that commits should be pushed to the branch
100+
// named. The branch is created using `.spec.checkout.branch` as the
101+
// starting point, if it doesn't already exist.
102+
// +optional
103+
Branch string `json:"branch,omitempty"`
104+
105+
// Refspec specifies the Git Refspec to use for a push operation.
106+
// If both Branch and Refspec are provided, then the commit is pushed
107+
// to the branch and also using the specified refspec.
108+
// For more details about Git Refspecs, see:
109+
// https://git-scm.com/book/en/v2/Git-Internals-The-Refspec
110+
// +optional
111+
Refspec string `json:"refspec,omitempty"`
112+
113+
// Options specifies the push options that are sent to the Git
114+
// server when performing a push operation. For details, see:
115+
// https://git-scm.com/docs/git-push#Documentation/git-push.txt---push-optionltoptiongt
116+
// +optional
117+
Options map[string]string `json:"options,omitempty"`
118+
}

api/v1/groupversion_info.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
Copyright 2025 The Flux authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// Package v1 contains API Schema definitions for the image v1 API group
18+
// +kubebuilder:object:generate=true
19+
// +groupName=image.toolkit.fluxcd.io
20+
package v1
21+
22+
import (
23+
"k8s.io/apimachinery/pkg/runtime/schema"
24+
"sigs.k8s.io/controller-runtime/pkg/scheme"
25+
)
26+
27+
var (
28+
// GroupVersion is group version used to register these objects
29+
GroupVersion = schema.GroupVersion{Group: "image.toolkit.fluxcd.io", Version: "v1"}
30+
31+
// SchemeBuilder is used to add go types to the GroupVersionKind scheme
32+
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
33+
34+
// AddToScheme adds the types in this group-version to the given scheme.
35+
AddToScheme = SchemeBuilder.AddToScheme
36+
)

0 commit comments

Comments
 (0)