Skip to content

Commit ab19a96

Browse files
author
Andrey Klimentyev
committed
Use HEAD instead of GET
to circumvent possible Registry API rate limits
1 parent bb3b4f8 commit ab19a96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/registry_checker/checker.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ func (rc *RegistryChecker) checkImageAvailability(log *logrus.Entry, imageName s
261261
indexedKeychain := *kc
262262
indexedKeychain.index = i
263263

264-
_, imgErr = remote.Image(ref, remote.WithAuthFromKeychain(&indexedKeychain), remote.WithTransport(rc.registryTransport))
264+
_, imgErr = remote.Head(ref, remote.WithAuthFromKeychain(&indexedKeychain), remote.WithTransport(rc.registryTransport))
265265

266266
if imgErr != nil {
267267
continue
@@ -272,7 +272,7 @@ func (rc *RegistryChecker) checkImageAvailability(log *logrus.Entry, imageName s
272272
}
273273
}
274274
} else {
275-
_, imgErr = remote.Image(ref, remote.WithTransport(rc.registryTransport))
275+
_, imgErr = remote.Head(ref, remote.WithTransport(rc.registryTransport))
276276
}
277277

278278
availMode = store.Available

0 commit comments

Comments
 (0)