Skip to content

Conversation

@adamkpickering
Copy link
Contributor

Related to rancher/rancher#52259.

Using the term "repository" to refer to "a location that stores many different images (not just different tags)" is incorrect. Technically, "repository" refers to a single image, which may have a number of different tags e.g. rancher/rancher. A better term for this use is "registry". This PR makes that change.

Note that this PR does not change occurrences of "repository" as in "git repository", nor does it change occurrences of "repository" as in "helm repository".

@adamkpickering adamkpickering requested a review from a team as a code owner November 26, 2025 23:56
Comment on lines -77 to +78
| `BaseUrl` | yes | The base URL for the repository. Appending `/` plus an image name should be a valid image reference.
| `BaseUrl` | yes | The base URL for the registry. Appending `/` plus an image name should be a valid image reference.
Copy link
Member

Choose a reason for hiding this comment

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

If you're here to correct terminology, this is NOT a BaseURL. If you were actually specifying the BaseURL for the registry API here, it would look something like https://dp.apps.rancher.io/v2.

What you instead seem to be keeping here is the target registry hostname plus optional namespace prefix - for example dp.apps.rancher.io/containers which is NOT a URL, and is actually comprised of both a hostname, and a namespace that is prefixed to the image name when syncing.

Copy link
Contributor Author

@adamkpickering adamkpickering Nov 27, 2025

Choose a reason for hiding this comment

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

Hmm, you're right that it isn't a URL. Though I'm not sure what to call it - BaseName? BaseRef? BaseImageRef? RepositoryPrefix? What do you think?

Copy link
Member

Choose a reason for hiding this comment

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

"BaseURL" could have a few interpretations - is it a "full URL used as the base value", or is it "the base string that URLs that will be constructed from". I think we mean the second one and I could see how the current term could imply the first meaning too.

It makes me wonder does "BaseURL == URLBase"? Potentially flipping it changes the implied meaning - where one will be more fitting for our use?


If we consider how this value is used, we construct a string like:

docker.io/rancher/mirrored-tonistiigi-xx:1.6.1

If we think about URI vs URL - it cannot be a URL as it has not protocol, however it can be considered a URI. If we included the protocol - like some tools require skopeo - then I think it would be a URL.

That in mind - maybe a term like URIBase or BaseURI is more accurate than using URL.

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.

3 participants