@@ -10,6 +10,7 @@ import (
10
10
11
11
"github.com/google/go-containerregistry/pkg/authn"
12
12
"github.com/google/go-containerregistry/pkg/name"
13
+ v1 "github.com/google/go-containerregistry/pkg/v1"
13
14
"github.com/google/go-containerregistry/pkg/v1/remote"
14
15
corev1 "k8s.io/api/core/v1"
15
16
)
@@ -27,7 +28,7 @@ func ContainerAnnotationKey(containerName string, initContainer bool) string {
27
28
return fmt .Sprintf (template , containerName )
28
29
}
29
30
30
- func GetDescriptor (imageName string , pullSecrets []corev1.Secret , insecureRegistries []string , rootCAs * x509.CertPool ) (* remote .Descriptor , error ) {
31
+ func GetDescriptor (imageName string , pullSecrets []corev1.Secret , insecureRegistries []string , rootCAs * x509.CertPool ) (* v1 .Descriptor , error ) {
31
32
keychains , err := GetKeychains (imageName , pullSecrets )
32
33
if err != nil {
33
34
return nil , err
@@ -41,7 +42,7 @@ func GetDescriptor(imageName string, pullSecrets []corev1.Secret, insecureRegist
41
42
var returnedErr error
42
43
for _ , keychain := range keychains {
43
44
opts := options (sourceRef , keychain , insecureRegistries , rootCAs )
44
- desc , err := remote .Get (sourceRef , opts ... )
45
+ desc , err := remote .Head (sourceRef , opts ... )
45
46
46
47
if err == nil { // stops at the first success
47
48
return desc , nil
0 commit comments