fix: provide refreshing CA pool (resolvers)

When a registry has _some_ TLS config included, the refreshing CA pool
was overwritten with the result returned from the config provider.

Ensure that is is restored back to the default value (unless explicitly
set by the provider if the registry CA is set).

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
Andrey Smirnov 2025-09-26 21:18:44 +04:00
parent d63c3ed7db
commit ab847310ef
No known key found for this signature in database
GPG Key ID: 322C6F63F594CE7C

View File

@ -60,6 +60,11 @@ func RegistryHosts(reg config.Registries) docker.RegistryHosts {
if err != nil {
return nil, fmt.Errorf("error preparing TLS config for %q: %w", u.Host, err)
}
// set up refreshing Root CAs if none were provided
if transport.TLSClientConfig.RootCAs == nil {
transport.TLSClientConfig.RootCAs = httpdefaults.RootCAs()
}
}
if u.Path == "" {