From 89e3f618974adfb0027c3c934261b14caa859c40 Mon Sep 17 00:00:00 2001 From: Vishal Choudhary Date: Tue, 29 Oct 2024 16:37:47 +0530 Subject: [PATCH] feat: skip azure keychain based login for mcr registry (#11480) Signed-off-by: Vishal Choudhary --- pkg/registryclient/authn.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/registryclient/authn.go b/pkg/registryclient/authn.go index 0a0397a33f..e2131f9dec 100644 --- a/pkg/registryclient/authn.go +++ b/pkg/registryclient/authn.go @@ -13,10 +13,6 @@ import ( var acrRE = regexp.MustCompile(`.*\.azurecr\.io|.*\.azurecr\.cn|.*\.azurecr\.de|.*\.azurecr\.us`) -const ( - mcrHostname = "mcr.microsoft.com" -) - type autoRefreshSecrets struct { lister corev1listers.SecretNamespaceLister imagePullSecrets []string @@ -72,9 +68,7 @@ func isACRRegistry(input string) bool { if err != nil { return false } - if serverURL.Hostname() == mcrHostname { - return true - } + matches := acrRE.FindStringSubmatch(serverURL.Hostname()) return len(matches) != 0 }