Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pkg/credentialprovider/azure_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ import (
// Refer: https://github.com/kubernetes/kubernetes/blob/master/pkg/credentialprovider/azure/azure_credentials.go

const (
maxReadLength = 10 * 1 << 20 // 10MB
defaultCacheTTL = 5 * time.Minute
maxReadLength = 10 * 1 << 20 // 10MB
// Since the ACR Refresh token TTL is around 3 hours, too short TTL may cause frequent token exchange and bring
// throttleling risk, so we set the cache TTL to 60 minutes, which is a trade-off between security and performance.
defaultCacheTTL = 60 * time.Minute

AcrAudience = "https://containerregistry.azure.net"
)
Expand Down