Commit 9056dd3
committed
[registry] Disable token refresh thread when prefetch is enabled
Add a new RegistryConfig field called `disable_token_refresh` that will decide whether the registry refresh token thread is started or not.
It will be set to false by default but will be enabled when prefetch is enabled. The refresh thread is disabled in this case because it becomes useless once everything has been prefetched and it's unlikely that tokens would expire during the time it takes for the prefetch to run (as it would mean that regular image pulls would be likely to fail as well because they download the layers in a similar time to the prefetch)
Signed-off-by: Baptiste Girard-Carrabin <baptiste.girardcarrabin@datadoghq.com>1 parent c100686 commit 9056dd3
2 files changed
Lines changed: 36 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
626 | 626 | | |
627 | 627 | | |
628 | 628 | | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
629 | 632 | | |
630 | 633 | | |
631 | 634 | | |
| |||
1364 | 1367 | | |
1365 | 1368 | | |
1366 | 1369 | | |
1367 | | - | |
| 1370 | + | |
1368 | 1371 | | |
1369 | 1372 | | |
1370 | 1373 | | |
| |||
1380 | 1383 | | |
1381 | 1384 | | |
1382 | 1385 | | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
1383 | 1393 | | |
1384 | 1394 | | |
1385 | 1395 | | |
| |||
1509 | 1519 | | |
1510 | 1520 | | |
1511 | 1521 | | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
1512 | 1531 | | |
1513 | 1532 | | |
1514 | 1533 | | |
1515 | | - | |
| 1534 | + | |
1516 | 1535 | | |
1517 | 1536 | | |
1518 | 1537 | | |
| |||
2099 | 2118 | | |
2100 | 2119 | | |
2101 | 2120 | | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
2102 | 2130 | | |
2103 | 2131 | | |
2104 | 2132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
883 | 883 | | |
884 | 884 | | |
885 | 885 | | |
886 | | - | |
887 | | - | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
888 | 892 | | |
889 | 893 | | |
890 | 894 | | |
| |||
0 commit comments