You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(sync): enable exponential HTTP retry backoff via maxRetryDelay (#4175)
Add optional maxRetryDelay to sync registry config and pass separate
init/max values to regclient WithDelay instead of using retryDelay for
both. When maxRetryDelay is unset, it defaults to retryDelay so existing
configs keep a fixed HTTP retry interval. Validate that maxRetryDelay
requires retryDelay and is not less than it.
Update examples and docs for the new option.
Signed-off-by: Andrei Aaron <andreifdaaron@gmail.com>
Copy file name to clipboardExpand all lines: examples/README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1358,7 +1358,8 @@ Configure each registry sync:
1358
1358
"tlsVerify": true, # whether or not to verify tls (default is true)
1359
1359
"certDir": "/home/user/certs", # use certificates at certDir path similar to Docker's /etc/docker/certs.d., if not specified then use the default certs dir,
1360
1360
"maxRetries": 5, # maxRetries in case of temporary errors (default: no retries)
1361
-
"retryDelay": "10m", # delay between retries, retry options are applied for both on demand and periodically sync and retryDelay is mandatory when using maxRetries.
1361
+
"retryDelay": "1s", # initial HTTP retry delay; mandatory when using maxRetries
1362
+
"maxRetryDelay": "30s", # max HTTP retry backoff; optional, defaults to retryDelay (fixed interval). Set higher than retryDelay for exponential backoff.
1362
1363
"onlySigned": true, # sync only signed images (either notary or cosign)
1363
1364
"content":[ # which content to periodically pull, also it's used for filtering ondemand images, if not set then periodically polling will not run
1364
1365
{
@@ -1405,7 +1406,8 @@ Configure each registry sync:
1405
1406
"onDemand": true, # doesn't have content, don't periodically pull, pull just on demand.
1406
1407
"tlsVerify": true,
1407
1408
"maxRetries": 3,
1408
-
"retryDelay": "15m"
1409
+
"retryDelay": "15m", # initial HTTP retry delay; fixed 15m interval unless maxRetryDelay is set higher
1410
+
"maxRetryDelay": "15m" # optional; omit or set equal to retryDelay for fixed interval (as here)
0 commit comments