Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add useProxies to registryMirror allowing to mirror more anything #965

Merged
merged 3 commits into from
Dec 30, 2021

Conversation

momiji
Copy link
Contributor

@momiji momiji commented Dec 29, 2021

Description

Add a new field in registryMirror, allowing to use proxies list to decide whether to use dragonfly.
By doing this, it is now possible to cache more than only blobs/sha256 urls, allowing to use dragonfly2 for other usage thatn docker registries, like yum repositories.

Also fix the whiteList test which is tested on direct request, although host is empty and canno tbe tested.

Please update the documentation in Chinese, I just can't do it.

Related Issue

#959

Motivation and Context

This PR now allows to use dragonfly to mirror yum repositories, at least.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation Update (if none of the other choices apply)

Checklist:

  • Code compiles correctly.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@momiji momiji requested a review from a team as a code owner December 29, 2021 11:36
@codecov-commenter
Copy link

codecov-commenter commented Dec 29, 2021

Codecov Report

Merging #965 (04a64ed) into main (abfa0a3) will increase coverage by 0.13%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #965      +/-   ##
==========================================
+ Coverage   42.19%   42.33%   +0.13%     
==========================================
  Files         116      116              
  Lines        8783     8788       +5     
==========================================
+ Hits         3706     3720      +14     
+ Misses       4609     4599      -10     
- Partials      468      469       +1     
Flag Coverage Δ
Object-compatibility-e2etests ?
e2etests ?
unittests 42.33% <71.42%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
client/config/peerhost.go 35.29% <ø> (ø)
client/daemon/proxy/proxy.go 8.50% <71.42%> (+1.23%) ⬆️
client/daemon/peer/peertask_base.go 45.38% <0.00%> (+0.57%) ⬆️
client/daemon/peer/peertask_stream.go 55.72% <0.00%> (+2.16%) ⬆️

@momiji momiji force-pushed the add_proxies_to_regisries_2 branch from a8bfbc7 to 55722d2 Compare December 29, 2021 16:58
@momiji momiji force-pushed the add_proxies_to_regisries_2 branch from 55722d2 to 04a64ed Compare December 29, 2021 17:00
@momiji
Copy link
Contributor Author

momiji commented Dec 29, 2021

I apologize as I've never done this before, but I guess once used to the PR process, it will be easier and less a pain for me :)

I've tested the fix and confirm is it working perfectly on my real environments, using the docker image built for this purpose on my github account.

Will there be a v2.0.2 or v2.1.0 version including the fix soon? Not sure if including the alpha changes is necessary.

@jim3ma
Copy link
Member

jim3ma commented Dec 30, 2021

I apologize as I've never done this before, but I guess once used to the PR process, it will be easier and less a pain for me :)

I've tested the fix and confirm is it working perfectly on my real environments, using the docker image built for this purpose on my github account.

Will there be a v2.0.2 or v2.1.0 version including the fix soon? Not sure if including the alpha changes is necessary.

Next release is v2.0.2. This change will be included.

Copy link
Member

@jim3ma jim3ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gaius-qi gaius-qi merged commit 5ba34ad into dragonflyoss:main Dec 30, 2021
gaius-qi pushed a commit that referenced this pull request Jun 28, 2023
…ng (#965)

* feat: add useProxies to registryMirror to allow mirroring anything

Signed-off-by: momiji <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants