Skip to content
This repository was archived by the owner on Mar 16, 2024. It is now read-only.

Commit 4bfbb7b

Browse files
committed
Add pull secret information to debug build issues
Signed-off-by: Daishan Peng <daishan@acorn.io>
1 parent 177abfe commit 4bfbb7b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/pullsecret/pullsecrets.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"github.com/google/go-containerregistry/pkg/authn"
1414
"github.com/google/go-containerregistry/pkg/authn/kubernetes"
1515
"github.com/google/go-containerregistry/pkg/name"
16+
"github.com/sirupsen/logrus"
1617
corev1 "k8s.io/api/core/v1"
1718
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1819
"sigs.k8s.io/controller-runtime/pkg/client"
@@ -71,6 +72,13 @@ func Keychain(ctx context.Context, c client.Reader, namespace string) (authn.Key
7172
}
7273
keychainSecrets = append(keychainSecrets, secrets...)
7374
}
75+
76+
var pullSecretNameAndNamespace []string
77+
for _, secret := range keychainSecrets {
78+
pullSecretNameAndNamespace = append(pullSecretNameAndNamespace, fmt.Sprintf("%s/%s", secret.Namespace, secret.Name))
79+
}
80+
81+
logrus.Infof("Using pull secrets: %v for builder namespace %s", pullSecretNameAndNamespace, namespace)
7482
return kubernetes.NewFromPullSecrets(ctx, keychainSecrets)
7583
}
7684

0 commit comments

Comments
 (0)