1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

feat: skip azure keychain based login for mcr registry (#11480)

Signed-off-by: Vishal Choudhary <vishal.choudhary@nirmata.com>
This commit is contained in:
Vishal Choudhary 2024-10-29 16:37:47 +05:30 committed by GitHub
parent 528b28f6e2
commit 89e3f61897
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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
}