k8s-image-swapper icon indicating copy to clipboard operation
k8s-image-swapper copied to clipboard

feat: Add native image handler backend

Open project0 opened this issue 1 year ago • 5 comments

This change adds a new native backend to remove eventually the need to depend on external skopeo binary. Using the native library allows much better control and error handling. It also enables us to add more easily new features like signing for example.

  • Migrate image inspect and copy into a interface
  • Migrate skopeo based calls into new package
  • Remove code duplication in registries
  • Add cache layer backend
  • Add new optional alternative native image backend

implements #443

project0 avatar Mar 24 '23 17:03 project0

~I had no time to test it yet :-)~ edit: works like a charm ;-)

project0 avatar Mar 24 '23 17:03 project0

It might need extra build tags to fix the gpgme dependency: https://github.com/containers/image#supported-build-tags

project0 avatar Mar 24 '23 17:03 project0

Codecov Report

Patch coverage: 2.29% and project coverage change: +2.81 :tada:

Comparison is base (123ee5b) 34.08% compared to head (2490389) 36.89%.

:exclamation: Current head 2490389 differs from pull request most recent head 94937fa. Consider uploading reports for the commit 94937fa to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #497      +/-   ##
==========================================
+ Coverage   34.08%   36.89%   +2.81%     
==========================================
  Files           9       10       +1     
  Lines         848      786      -62     
==========================================
+ Hits          289      290       +1     
+ Misses        534      471      -63     
  Partials       25       25              
Impacted Files Coverage Δ
pkg/config/config.go 0.00% <ø> (ø)
pkg/registry/cache.go 0.00% <0.00%> (ø)
pkg/registry/client.go 25.58% <0.00%> (-12.35%) :arrow_down:
pkg/registry/gar.go 13.59% <5.26%> (+4.67%) :arrow_up:
pkg/registry/ecr.go 8.79% <6.66%> (+2.54%) :arrow_up:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Mar 25 '23 10:03 codecov[bot]

Hello @estahn,

Wdyt of this PR ? Anything needed ?

mloiseleur avatar Apr 27 '23 09:04 mloiseleur

@project0 Apologies it took me so long to look at things. Could you resolve the conflicting files? I tried, but there are some changes in ecr.go I'm not entirely sure about.

estahn avatar Feb 13 '24 12:02 estahn