misc: address duplicate imports
Signed-off-by: Hidde Beydals <hidde@hhh.computer>
This commit is contained in:
parent
a74eb57811
commit
20230811e4
|
@ -34,7 +34,6 @@ import (
|
|||
"github.com/google/go-containerregistry/pkg/authn/k8schain"
|
||||
"github.com/google/go-containerregistry/pkg/name"
|
||||
gcrv1 "github.com/google/go-containerregistry/pkg/v1"
|
||||
v1 "github.com/google/go-containerregistry/pkg/v1"
|
||||
"github.com/google/go-containerregistry/pkg/v1/remote"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
@ -578,13 +577,13 @@ func (r *OCIRepositoryReconciler) selectLayer(obj *ociv1.OCIRepository, image gc
|
|||
func (r *OCIRepositoryReconciler) getRevision(ref name.Reference, options []remote.Option) (string, error) {
|
||||
switch ref := ref.(type) {
|
||||
case name.Digest:
|
||||
digest, err := v1.NewHash(ref.DigestStr())
|
||||
digest, err := gcrv1.NewHash(ref.DigestStr())
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return digest.String(), nil
|
||||
case name.Tag:
|
||||
var digest v1.Hash
|
||||
var digest gcrv1.Hash
|
||||
|
||||
desc, err := remote.Head(ref, options...)
|
||||
if err == nil {
|
||||
|
|
|
@ -19,7 +19,6 @@ package controller
|
|||
import (
|
||||
"crypto/rand"
|
||||
"crypto/tls"
|
||||
cryptotls "crypto/tls"
|
||||
"crypto/x509"
|
||||
"crypto/x509/pkix"
|
||||
"encoding/pem"
|
||||
|
@ -830,7 +829,7 @@ func TestOCIRepository_reconcileSource_authStrategy(t *testing.T) {
|
|||
func makeTransport(insecure bool) http.RoundTripper {
|
||||
transport := remote.DefaultTransport.(*http.Transport).Clone()
|
||||
if insecure {
|
||||
transport.TLSClientConfig = &cryptotls.Config{
|
||||
transport.TLSClientConfig = &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,6 @@ import (
|
|||
"github.com/fluxcd/source-controller/internal/oci"
|
||||
"github.com/google/go-containerregistry/pkg/authn"
|
||||
"helm.sh/helm/v3/pkg/registry"
|
||||
helmreg "helm.sh/helm/v3/pkg/registry"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
)
|
||||
|
||||
|
@ -143,7 +142,7 @@ func (r stringResource) RegistryStr() string {
|
|||
|
||||
// NewLoginOption returns a registry login option for the given HelmRepository.
|
||||
// If the HelmRepository does not specify a secretRef, a nil login option is returned.
|
||||
func NewLoginOption(auth authn.Authenticator, keychain authn.Keychain, registryURL string) (helmreg.LoginOption, error) {
|
||||
func NewLoginOption(auth authn.Authenticator, keychain authn.Keychain, registryURL string) (registry.LoginOption, error) {
|
||||
if auth != nil {
|
||||
return AuthAdaptHelper(auth)
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ import (
|
|||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/cloud"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
|
||||
_ "github.com/Azure/azure-sdk-for-go/sdk/azidentity"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/bloberror"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
|
|
Loading…
Reference in New Issue