@@ -18,6 +18,7 @@ The following update strategies are currently supported:
18
18
* [ latest/newest-build] ( #strategy-latest ) - Update to the most recently built image found in a registry
19
19
* [ digest] ( #strategy-digest ) - Update to the latest version of a given version (tag), using the tag's SHA digest
20
20
* [ name/alphabetical] ( #strategy-name ) - Sorts tags alphabetically and update to the one with the highest cardinality
21
+ * [ calver] ( #strategy-calver ) - Update to the latest version of an image considering calendar versioning constraints
21
22
22
23
!!!warning "Renamed image update strategies"
23
24
The ` latest ` strategy has been renamed to ` newest-build ` , and ` name ` strategy has been renamed to ` alphabetical ` .
@@ -292,3 +293,53 @@ argocd-image-updater.argoproj.io/myimage.allow-tags: regexp:^[0-9]{4}-[0-9]{2}-[
292
293
would only consider tags that match a given regular expression for update. In
293
294
this case, only tags matching a date specification of `YYYY-MM-DD` would be
294
295
considered for update.
296
+
297
+ # ## <a name="strategy-calver"></a>calver - Update to calendar versions
298
+
299
+ Strategy name : ` calver`
300
+
301
+ Basic configuration :
302
+
303
+ ` ` ` yaml
304
+ argocd-image-updater.argoproj.io/image-list: some/image[:<version_constraint>]
305
+ argocd-image-updater.argoproj.io/<image>.update-strategy: calver
306
+ ` ` `
307
+
308
+ The `calver` strategy allows you to track & update images which use tags that
309
+ follow the
310
+ [calendar versioning scheme](https://calver.org). Tag names must contain calver
311
+ compatible identifiers in the format `YYYY.MM.DD`, where `YYYY`, `MM`, and `DD` must be
312
+ whole numbers.
313
+
314
+ This will allow you to update to the latest version of an image within a given
315
+ year, month, or day, or just to the latest version that is tagged with a valid
316
+ calendar version identifier.
317
+
318
+ To tell Argo CD Image Updater which versions are allowed, simply give a calver
319
+ version as a constraint in the `image-list` annotation. For example, to allow
320
+ updates to the latest version within the `2023.08` month, use
321
+
322
+ ```
323
+ argocd-image-updater.argoproj.io/image-list: some/image:2023.08.x
324
+ ```
325
+
326
+ The above example would update to any new tag pushed to the registry matching
327
+ this constraint, e.g. `2023.08.15`, `2023.08.30` etc, but not to a new month
328
+ (e.g. `2023.09`).
329
+
330
+ Likewise, to allow updates to any month within the year `2023`,
331
+ use
332
+
333
+ ```yaml
334
+ argocd-image-updater.argoproj.io/image-list: some/image:2023.x
335
+ ```
336
+
337
+ The above example would update to any new tag pushed to the registry matching
338
+ this constraint, e.g. ` 2023.08.15 ` , ` 2023.09.01 ` , ` 2023.12.31 ` etc, but not to a new year
339
+ (e.g. ` 2024 ` ).
340
+
341
+ If no version constraint is specified in the list of allowed images, Argo CD
342
+ Image Updater will pick the highest version number found in the registry.
343
+
344
+ Argo CD Image Updater will omit any tags from your registry that do not match
345
+ a calendar version when using the ` calver ` update strategy.
0 commit comments