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

feat: enable specifying harbor as remote domain in REGISTRY_PROXY_REMOTEDOMAIN #4342

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kahirokunn
Copy link

@kahirokunn kahirokunn commented May 8, 2024

Description

This PR introduces the ability to specify Harbor as the remote domain in the REGISTRY_PROXY_REMOTEDOMAIN configuration. Previously, the proxy registry defaulted the remote URL path to /v2/ unconditionally. This update ensures the path defaults to /v2/ only when no other path has been set, allowing for greater flexibility in configuring remote domains such as Harbor.

Changes

  • Modified the behavior of setting the remote URL path in proxyregistry.go to conditionally set the default path to /v2/ only if it is either unset or set to the root /.

Motivation

This enhancement facilitates users who are integrating Harbor with our proxy registry system by allowing more precise control over the remote domain settings. It ensures that the proxy can effectively communicate with a Harbor backend by accommodating custom URL paths.

@github-actions github-actions bot added the area/proxy Related to registry as a pull-through cache label May 8, 2024
…OTEDOMAIN

distribution#4340

Signed-off-by: kahirokunn <okinakahiro@gmail.com>
Comment on lines +242 to +244
if remoteURL.Path == "" || remoteURL.Path == "/" {
remoteURL.Path = "/v2/"
}
Copy link
Member

Choose a reason for hiding this comment

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

If we're gonna do something like that we should make the path configurable in proxy.

Copy link
Author

Choose a reason for hiding this comment

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

That's certainly true.
I'll try to implement it with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/proxy Related to registry as a pull-through cache
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants