rancher / wharfie

Pulls and unpacks a container image to the local filesystem. Usable both as a standalone CLI tool, and as a go module.
Apache License 2.0
25 stars 14 forks source link

Refactor registries package to support multiple endpoints #6

Closed brandond closed 2 years ago

brandond commented 2 years ago

This will probably be tagged as v1.x since it changes the API pretty significantly.

Instead of hooking in a Transport/RoundTripper override via options on a remote.Image, the registries type now has its own Image function that tries all the endpoints and returns a remote.Image from the first one that works.

This also adds tests, and fixes some incorrect behavior around endpoint ordering and credentials lookup.

When pulled through to RKE2, this should resolve the customer request from https://jira.suse.com/browse/SURE-2987

Signed-off-by: Brad Davidson brad.davidson@rancher.com