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:
parent
528b28f6e2
commit
89e3f61897
1 changed files with 1 additions and 7 deletions
|
@ -13,10 +13,6 @@ import (
|
||||||
|
|
||||||
var acrRE = regexp.MustCompile(`.*\.azurecr\.io|.*\.azurecr\.cn|.*\.azurecr\.de|.*\.azurecr\.us`)
|
var acrRE = regexp.MustCompile(`.*\.azurecr\.io|.*\.azurecr\.cn|.*\.azurecr\.de|.*\.azurecr\.us`)
|
||||||
|
|
||||||
const (
|
|
||||||
mcrHostname = "mcr.microsoft.com"
|
|
||||||
)
|
|
||||||
|
|
||||||
type autoRefreshSecrets struct {
|
type autoRefreshSecrets struct {
|
||||||
lister corev1listers.SecretNamespaceLister
|
lister corev1listers.SecretNamespaceLister
|
||||||
imagePullSecrets []string
|
imagePullSecrets []string
|
||||||
|
@ -72,9 +68,7 @@ func isACRRegistry(input string) bool {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if serverURL.Hostname() == mcrHostname {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
matches := acrRE.FindStringSubmatch(serverURL.Hostname())
|
matches := acrRE.FindStringSubmatch(serverURL.Hostname())
|
||||||
return len(matches) != 0
|
return len(matches) != 0
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue