estahn / k8s-image-swapper

Mirror images into your own registry and swap image references automatically.
https://estahn.github.io/k8s-image-swapper/
MIT License
535 stars 44 forks source link

fix: expire cache items after 24h+ #669

Closed estahn closed 8 months ago

estahn commented 8 months ago

Introduces TTL to cache items to prevent incorrect swaps. The TTL is 24h + random 180 minutes to prevent a cache stampede.

fixes #632

codecov[bot] commented 8 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (7dc48ee) 34.08% compared to head (cc4c3d4) 34.08%. Report is 20 commits behind head on main.

Files Patch % Lines
pkg/registry/ecr.go 0.00% 2 Missing :warning:
pkg/registry/gar.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #669 +/- ## ======================================= Coverage 34.08% 34.08% ======================================= Files 9 9 Lines 848 848 ======================================= Hits 289 289 Misses 534 534 Partials 25 25 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.