Skip to content

Commit

Permalink
Don't wrap DefaultKeychain with refreshes (#1791)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jonjohnsonjr authored Sep 19, 2023
1 parent a748190 commit dbcd01c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/authn/keychain.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type defaultKeychain struct {

var (
// DefaultKeychain implements Keychain by interpreting the docker config file.
DefaultKeychain = RefreshingKeychain(&defaultKeychain{}, 5*time.Minute)
DefaultKeychain = &defaultKeychain{}
)

const (
Expand Down

0 comments on commit dbcd01c

Please sign in to comment.