zot
zot copied to clipboard
Support storing image logos as manifest annotations
This commit allows storing base64 encoded logos under image manifest annotations, using com.zot.logo key. Logos have type limitations (only jpeg, png and gif allowed) and a maximum allowed size (200x200 px).
What type of PR is this? feature
Which issue does this PR fix: closes https://github.com/project-zot/zot/issues/806
What does this PR do / Why do we need it:
If an issue # is not available please add repro steps and logs showing the issue:
Testing done on this change:
Automation added to e2e:
Will this break upgrades or downgrades?
Does this PR introduce any user-facing change?:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Codecov Report
Merging #833 (67b0a7b) into main (50aacb6) will increase coverage by
0.07%
. The diff coverage is90.74%
.
@@ Coverage Diff @@
## main #833 +/- ##
==========================================
+ Coverage 89.09% 89.17% +0.07%
==========================================
Files 71 71
Lines 13737 13787 +50
==========================================
+ Hits 12239 12294 +55
+ Misses 1170 1165 -5
Partials 328 328
Impacted Files | Coverage Δ | |
---|---|---|
pkg/extensions/lint/lint.go | 86.48% <86.11%> (-0.70%) |
:arrow_down: |
pkg/extensions/search/common/common.go | 94.11% <100.00%> (+0.36%) |
:arrow_up: |
pkg/extensions/search/common/oci_layout.go | 93.82% <100.00%> (+0.01%) |
:arrow_up: |
pkg/extensions/search/resolver.go | 92.34% <100.00%> (+0.06%) |
:arrow_up: |
pkg/extensions/search/schema.resolvers.go | 83.59% <100.00%> (+0.07%) |
:arrow_up: |
pkg/test/common.go | 87.14% <0.00%> (+0.35%) |
:arrow_up: |
pkg/scheduler/scheduler.go | 92.06% <0.00%> (+0.52%) |
:arrow_up: |
pkg/storage/local/local.go | 84.57% <0.00%> (+0.67%) |
:arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
We should really be using #936 for this.
We should really be using #936 for this.
I agree. The graphql API would be the same, and return the base64 encoded image? I think the image blob itself should not be compressed, right? It would be an overhead to decompress when the call to get the image is made?
Will redesign this and implement as part of: https://github.com/project-zot/zot/pull/1018