@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33kind : CustomResourceDefinition
44metadata :
55 annotations :
6- controller-gen.kubebuilder.io/version : v0.16.1
6+ controller-gen.kubebuilder.io/version : v0.19.0
77 name : imageupdaters.argocd-image-updater.argoproj.io
88spec :
99 group : argocd-image-updater.argoproj.io
5555 description : |-
5656 CommonUpdateSettings overrides the global CommonUpdateSettings for applications
5757 matched by this selector.
58+ This field is ignored when UseAnnotations is true.
5859 properties :
5960 allowTags :
6061 description : |-
@@ -101,6 +102,7 @@ spec:
101102 Images contains a list of configurations that how images should be updated.
102103 These rules apply to applications selected by namePattern in ApplicationRefs, and each
103104 image can override global/ApplicationRef settings.
105+ This field is ignored when UseAnnotations is true.
104106 items :
105107 description : |-
106108 ImageConfig defines how a specific container image should be discovered, updated,
@@ -180,25 +182,23 @@ spec:
180182 description : |-
181183 Name is the dot-separated path to the Helm key for the image repository/name part.
182184 Example: "image.repository", "frontend.deployment.image.name".
183- This field is required if the Helm target is used.
185+ If neither spec nor name/tag are set, defaults to "image.name".
186+ If spec is set, this field is ignored.
184187 type : string
185188 spec :
186189 description : |-
187- Spec is an optional dot-separated path to a Helm key where the full image string
190+ Spec is the dot-separated path to a Helm key where the full image string
188191 (e.g., "image/name:1.0") should be written.
189192 Use this if your Helm chart expects the entire image reference in a single field,
190- rather than separate name/tag fields. If this is set, other Helm parameter-related
191- options will be ignored.
193+ rather than separate name/tag fields. If this is set, name and tag will be ignored.
192194 type : string
193195 tag :
194196 description : |-
195197 Tag is the dot-separated path to the Helm key for the image tag part.
196198 Example: "image.tag", "frontend.deployment.image.version".
197- This field is required if the Helm target is used.
199+ If neither spec nor name/tag are set, defaults to "image.tag".
200+ If spec is set, this field is ignored.
198201 type : string
199- required :
200- - name
201- - tag
202202 type : object
203203 kustomize :
204204 description : |-
@@ -225,7 +225,6 @@ spec:
225225 - alias
226226 - imageName
227227 type : object
228- minItems : 1
229228 type : array
230229 x-kubernetes-list-map-keys :
231230 - alias
@@ -281,10 +280,21 @@ spec:
281280 description : NamePattern indicates the glob pattern for application
282281 name
283282 type : string
283+ useAnnotations :
284+ default : false
285+ description : |-
286+ UseAnnotations When true, read image configuration from Application's
287+ argocd-image-updater.argoproj.io/* annotations instead of
288+ requiring explicit Images[] configuration in this CR.
289+ When this field is set to true, only namePattern and labelSelectors are used for
290+ application selection. All other fields (CommonUpdateSettings, WriteBackConfig, Images)
291+ are ignored.
292+ type : boolean
284293 writeBackConfig :
285294 description : |-
286295 WriteBackConfig overrides the global WriteBackConfig settings for applications
287296 matched by this selector.
297+ This field is ignored when UseAnnotations is true.
288298 properties :
289299 gitConfig :
290300 description : |-
@@ -322,9 +332,13 @@ spec:
322332 - method
323333 type : object
324334 required :
325- - images
326335 - namePattern
327336 type : object
337+ x-kubernetes-validations :
338+ - message : Either useAnnotations must be true, or images must be
339+ provided with at least one item
340+ rule : ' !(has(self.useAnnotations) && self.useAnnotations == true)
341+ ? (has(self.images) && size(self.images) > 0) : true'
328342 minItems : 1
329343 type : array
330344 x-kubernetes-list-map-keys :
0 commit comments