Skip to content

Commit dbcd01c

Browse files
authored
Don't wrap DefaultKeychain with refreshes (#1791)
The heuristic only works well if the upstream keychain doesn't do any caching. This is usually the case, but I've run into a couple situations where the hardcoded 5 minutes does not overlap well with certain cred helper implementations. Undoing that wrap allows callers to set a time that makes sense for them. With the wrap, there's not any direct reference to DefaultKeychain, which feels... bad.
1 parent a748190 commit dbcd01c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/authn/keychain.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type defaultKeychain struct {
5353

5454
var (
5555
// DefaultKeychain implements Keychain by interpreting the docker config file.
56-
DefaultKeychain = RefreshingKeychain(&defaultKeychain{}, 5*time.Minute)
56+
DefaultKeychain = &defaultKeychain{}
5757
)
5858

5959
const (

0 commit comments

Comments
 (0)