@@ -15,9 +15,13 @@ The following update strategies are currently supported:
15
15
16
16
* [ semver] ( #strategy-semver ) - Update to the latest version of an image
17
17
considering semantic versioning constraints
18
- * [ latest] ( #strategy-latest ) - Update to the most recently built image found in a registry
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
- * [ name] ( #strategy-name ) - Sorts tags alphabetically and update to the one with the highest cardinality
20
+ * [ name/alphabetical] ( #strategy-name ) - Sorts tags alphabetically and update to the one with the highest cardinality
21
+
22
+ !!!warning "Renamed image update strategies
23
+ The ` latest ` strategy has been renamed to ` newest-build ` , and ` name ` strategy has been renamed to ` alphabetical ` .
24
+ Please switch to the new convention as support for the old naming convention will be removed in future releases.
21
25
22
26
Some of the strategies will require additional configuration, or can be tweaked
23
27
with additional parameters. Please have a look at the
@@ -97,30 +101,42 @@ Image Updater will pick the highest version number found in the registry.
97
101
Argo CD Image Updater will omit any tags from your registry that do not match
98
102
a semantic version when using the ` semver ` update strategy.
99
103
100
- ### <a name =" strategy-latest " ></a >latest - Update to the most recently built image
104
+ ### <a name =" strategy-latest " ></a >latest/newest-build - Update to the most recently built image
105
+
106
+
107
+ !!!warning "Renamed image update strategies"
108
+ The ` latest ` strategy has been renamed to ` newest-build ` .
109
+ Please switch to the new convention as support for the old naming convention will be removed in future releases.
110
+ Detected usage of ` latest ` will result in a warning message within the image-updater controller logs.
101
111
102
112
!!!warning
103
113
As of November 2020, Docker Hub has introduced pull limits for accounts on
104
- the free plan and unauthenticated requests. The ` latest ` update strategy
114
+ the free plan and unauthenticated requests. The ` latest ` or ` newest-build ` update strategy
105
115
will perform manifest pulls for determining the most recently pushed tags,
106
116
and these will count into your pull limits. So unless you are not affected
107
- by these pull limits, it is ** not recommended** to use the ` latest ` update
117
+ by these pull limits, it is ** not recommended** to use the ` latest ` or ` newest-build ` update
108
118
strategy with images hosted on Docker Hub.
109
119
110
120
!!!note
111
121
If you are using * reproducible builds* for your container images (e.g. if
112
122
your build pipeline always sets the creation date of the image to the same
113
- value), the ` latest ` strategy will not be able to determine which tag to
123
+ value), the ` latest ` or ` newest-build ` strategy will not be able to determine which tag to
114
124
update to.
115
125
116
- Strategy name: ` latest `
126
+ Strategy name: ` latest ` or ` newest-build `
117
127
118
128
Basic configuration:
119
129
120
130
``` yaml
121
131
argocd-image-updater.argoproj.io/image-list : <alias>=some/image
122
132
argocd-image-updater.argoproj.io/<alias>.update-strategy : latest
123
133
` ` `
134
+ or
135
+
136
+ ` ` ` yaml
137
+ argocd-image-updater.argoproj.io/image-list : <alias>=some/image
138
+ argocd-image-updater.argoproj.io/<alias>.update-strategy : newest-build
139
+ ` ` `
124
140
125
141
Argo CD Image Updater can update to the image that has the most recent build
126
142
date, and is tagged with an arbitrary name (e.g. a Git commit SHA, or even a
@@ -147,6 +163,14 @@ argocd-image-updater.argoproj.io/myimage.update-strategy: latest
147
163
argocd-image-updater.argoproj.io/myimage.allow-tags: regexp:^[0-9a-f]{7}$
148
164
` ` `
149
165
166
+ or
167
+
168
+ ` ` ` yaml
169
+ argocd-image-updater.argoproj.io/image-list: myimage=some/image
170
+ argocd-image-updater.argoproj.io/myimage.update-strategy: newest-build
171
+ argocd-image-updater.argoproj.io/myimage.allow-tags: regexp:^[0-9a-f]{7}$
172
+ ` ` `
173
+
150
174
would only consider tags that match a given regular expression for update. In
151
175
this case, the regular expression matches a 7-digit hexadecimal string that
152
176
could represent the short version of a Git commit SHA, so it would match tags
@@ -160,6 +184,14 @@ argocd-image-updater.argoproj.io/myimage.update-strategy: latest
160
184
argocd-image-updater.argoproj.io/myimage.ignore-tags: latest, master
161
185
` ` `
162
186
187
+ or
188
+
189
+ ` ` ` yaml
190
+ argocd-image-updater.argoproj.io/image-list: myimage=some/image
191
+ argocd-image-updater.argoproj.io/myimage.update-strategy: newest-build
192
+ argocd-image-updater.argoproj.io/myimage.ignore-tags: latest, master
193
+ ` ` `
194
+
163
195
This would allow for considering all tags found but `latest` and `master`. You
164
196
can read more about filtering tags
165
197
[here](../../configuration/images/#filtering-tags).
@@ -206,14 +238,26 @@ argocd-image-updater.argoproj.io/myimage.update-strategy: digest
206
238
207
239
# ## <a name="strategy-name"></a>Update according to lexical sort
208
240
209
- Strategy name : ` name`
241
+ !!!warning "Renamed image update strategies"
242
+ The `name` strategy has been renamed to `alphabetical`.
243
+ Please switch to the new convention as support for the old naming convention will be removed in future releases.
244
+ Detected usage of `name` will result in a warning message within the image-updater controller logs.
245
+
246
+
247
+ Strategy name : ` name` or `alphabetical`
210
248
211
249
Basic configuration :
212
250
213
251
` ` ` yaml
214
252
argocd-image-updater.argoproj.io/image-list: <alias>=some/image
215
253
argocd-image-updater.argoproj.io/<alias>.update-strategy: name
216
254
` ` `
255
+ or
256
+
257
+ ` ` ` yaml
258
+ argocd-image-updater.argoproj.io/image-list: <alias>=some/image
259
+ argocd-image-updater.argoproj.io/<alias>.update-strategy: alphabetical
260
+ ` ` `
217
261
218
262
This update strategy sorts the tags returned by the registry in a lexical way
219
263
(by name, in descending order) and picks the last tag in the list for update.
@@ -231,6 +275,14 @@ argocd-image-updater.argoproj.io/myimage.update-strategy: name
231
275
argocd-image-updater.argoproj.io/myimage.allow-tags: regexp:^[0-9]{4}-[0-9]{2}[0-9]{2}$
232
276
` ` `
233
277
278
+ or
279
+
280
+ ` ` ` yaml
281
+ argocd-image-updater.argoproj.io/image-list: myimage=some/image
282
+ argocd-image-updater.argoproj.io/myimage.update-strategy: alphabetical
283
+ argocd-image-updater.argoproj.io/myimage.allow-tags: regexp:^[0-9]{4}-[0-9]{2}[0-9]{2}$
284
+ ` ` `
285
+
234
286
would only consider tags that match a given regular expression for update. In
235
287
this case, only tags matching a date specification of `YYYY-MM-DD` would be
236
288
considered for update.
0 commit comments