chore: add additional logging for creds helper
@@ -131,7 +131,9 @@ func (d *dockerActor) pullImage(ctx *actor.Context, msg pullImage) {
sendErr(ctx, errors.Wrap(err, "error encoding registry credentials"))
return
}
- } else if store, ok := d.credentialStores[reference.Domain(ref)]; ok {
+ } else {
+ domain := reference.Domain(ref)
+ if store, ok := d.credentialStores[domain]; ok {
var creds types.AuthConfig
creds, err = store.get()
if err != nil {
@@ -143,6 +145,12 @@ func (d *dockerActor) pullImage(ctx *actor.Context, msg pullImage) {
sendErr(ctx, errors.Wrap(err, "error encoding registry credentials from helper"))
return
}
+ d.sendAuxLog(ctx, fmt.Sprintf(
+ "domain '%s' found in 'credHelpers' config. Using credentials helper.", domain))
+ } else {
+ d.sendAuxLog(ctx, fmt.Sprintf(
+ "domain '%s' not found in 'credHelpers' config. Using anonymous credentials.", domain))
+ }
}
opts := types.ImagePullOptions{
