mirror of
https://github.com/kyverno/kyverno.git
synced 2025-04-15 08:46:36 +00:00
feat: update default keychain in registry to be empty (#7906)
* feat: update default keychain to be empty Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com> * feat: update registryCredentialHelpers description Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com> --------- Signed-off-by: Vishal Choudhary <sendtovishalchoudhary@gmail.com>
This commit is contained in:
parent
34a6119cc3
commit
0e2cbf8a01
3 changed files with 10 additions and 8 deletions
|
@ -99,7 +99,7 @@ func initCosignFlags() {
|
|||
func initRegistryClientFlags() {
|
||||
flag.BoolVar(&allowInsecureRegistry, "allowInsecureRegistry", false, "Whether to allow insecure connections to registries. Don't use this for anything but testing.")
|
||||
flag.StringVar(&imagePullSecrets, "imagePullSecrets", "", "Secret resource names for image registry access credentials.")
|
||||
flag.StringVar(®istryCredentialHelpers, "registryCredentialHelpers", "", "Credential helpers to enable (default,google,amazon,azure,github), all will be enabled if empty.")
|
||||
flag.StringVar(®istryCredentialHelpers, "registryCredentialHelpers", "", "Credential helpers to enable (default,google,amazon,azure,github). No helpers are added when this flag is empty.")
|
||||
}
|
||||
|
||||
func initLeaderElectionFlags() {
|
||||
|
|
|
@ -24,3 +24,11 @@ func (kc *autoRefreshSecrets) Resolve(resource authn.Resource) (authn.Authentica
|
|||
}
|
||||
return inner.Resolve(resource)
|
||||
}
|
||||
|
||||
type anonymuskc struct{}
|
||||
|
||||
var AnonymousKeychain authn.Keychain = anonymuskc{}
|
||||
|
||||
func (anonymuskc) Resolve(_ authn.Resource) (authn.Authenticator, error) {
|
||||
return authn.Anonymous, nil
|
||||
}
|
||||
|
|
|
@ -24,13 +24,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
defaultKeychain = authn.NewMultiKeychain(
|
||||
authn.DefaultKeychain,
|
||||
google.Keychain,
|
||||
authn.NewKeychainFromHelper(ecr.NewECRHelper(ecr.WithLogger(io.Discard))),
|
||||
authn.NewKeychainFromHelper(credhelper.NewACRCredentialsHelper()),
|
||||
github.Keychain,
|
||||
)
|
||||
defaultKeychain = AnonymousKeychain
|
||||
defaultTransport = &http.Transport{
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
DialContext: (&net.Dialer{
|
||||
|
|
Loading…
Add table
Reference in a new issue