Update vendor

This commit is contained in:
Erik Wilson 2019-10-30 16:41:45 -07:00
parent b576abf32d
commit 1cef47fb51
2 changed files with 13 additions and 2 deletions

View File

@ -346,6 +346,17 @@ func (c *criService) registryHosts(auth *runtime.AuthConfig) docker.RegistryHost
}
}
// defaultScheme returns the default scheme for a registry host.
func defaultScheme(host string) string {
if h, _, err := net.SplitHostPort(host); err == nil {
host = h
}
if host == "localhost" || host == "127.0.0.1" || host == "::1" {
return "http"
}
return "https"
}
// registryEndpoints returns endpoints for a given host.
// It adds default registry endpoint if it does not exist in the passed-in endpoint list.
// It also supports wildcard host matching with `*`.
@ -371,7 +382,7 @@ func (c *criService) registryEndpoints(host string) ([]string, error) {
return endpoints, nil
}
}
return append(endpoints, "https://"+defaultHost), nil
return append(endpoints, defaultScheme(defaultHost)+"://"+defaultHost), nil
}
// newTransport returns a new HTTP transport used to pull image.

2
vendor/modules.txt vendored
View File

@ -288,7 +288,7 @@ github.com/containerd/continuity/pathdriver
github.com/containerd/continuity/devices
github.com/containerd/continuity/driver
github.com/containerd/continuity/proto
# github.com/containerd/cri v1.11.1-0.20191009213552-1fb415d208be
# github.com/containerd/cri v0.0.0-00010101000000-000000000000 => github.com/rancher/cri v1.3.0-k3s.2
github.com/containerd/cri
github.com/containerd/cri/pkg/config
github.com/containerd/cri/pkg/constants