registry/client: use NewClientWithDockerFallback from oras v1.1.0-rc3

Uses NewClientWithDockerFallback to always use Docker config and
modifies go.mod to use oras v1.1.0-rc3.

Ref:
 - https://github.com/helm/helm/pull/10536#issuecomment-1010144075
 - https://github.com/oras-project/oras-go/pull/92
Signed-off-by: Allen Bai <abai@redhat.com>
pull/10536/head
Allen Bai 3 years ago
parent e08a9270be
commit e3897ad6b1
No known key found for this signature in database
GPG Key ID: 4E4FDD176214CCF7

@ -42,6 +42,6 @@ require (
k8s.io/client-go v0.23.1 k8s.io/client-go v0.23.1
k8s.io/klog/v2 v2.30.0 k8s.io/klog/v2 v2.30.0
k8s.io/kubectl v0.23.1 k8s.io/kubectl v0.23.1
oras.land/oras-go v1.1.0-rc2 oras.land/oras-go v1.1.0-rc3
sigs.k8s.io/yaml v1.3.0 sigs.k8s.io/yaml v1.3.0
) )

@ -1746,8 +1746,8 @@ k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b h1:wxEMGetGMur3J1xuGLQY7GEQYg9bZxKn3tKo5k/eYcs=
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
oras.land/oras-go v1.1.0-rc2 h1:NVMIdNfgRp2TR6oIEmu3w0NTIje2FUav3e7dKjYrrX0= oras.land/oras-go v1.1.0-rc3 h1:+HdHR0Lgm/0jmjF4SqUif8Ky2XNWhrcP4hxGVvtKIUI=
oras.land/oras-go v1.1.0-rc2/go.mod h1:1A7vR/0KknT2UkJVWh+xMi95I/AhK8ZrxrnUSmXN0bQ= oras.land/oras-go v1.1.0-rc3/go.mod h1:1A7vR/0KknT2UkJVWh+xMi95I/AhK8ZrxrnUSmXN0bQ=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=

@ -72,7 +72,7 @@ func NewClient(options ...ClientOption) (*Client, error) {
client.credentialsFile = helmpath.ConfigPath(CredentialsFileBasename) client.credentialsFile = helmpath.ConfigPath(CredentialsFileBasename)
} }
if client.authorizer == nil { if client.authorizer == nil {
authClient, err := dockerauth.NewClient(client.credentialsFile) authClient, err := dockerauth.NewClientWithDockerFallback(client.credentialsFile)
if err != nil { if err != nil {
return nil, err return nil, err
} }

Loading…
Cancel
Save