1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-31 03:45:17 +00:00
This commit is contained in:
shuting 2020-05-14 12:32:11 -07:00 committed by GitHub
parent ffe9fbd05b
commit 6f039147c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,7 +52,7 @@ func NewClient(config *rest.Config, resync time.Duration, stopCh <-chan struct{}
client: dclient,
clientConfig: config,
kclient: kclient,
log: log.WithName("Client"),
log: log.WithName("dclient"),
}
// Set discovery client
discoveryClient := ServerPreferredResources{cachedClient: memory.NewMemCacheClient(kclient.Discovery()), log: client.log}
@ -292,8 +292,7 @@ func loadServerResources(k string, cdi discovery.CachedDiscoveryInterface, log l
emptyGVR := schema.GroupVersionResource{}
serverresources, err := cdi.ServerPreferredResources()
if err != nil {
logger.Error(err, "failed to get registered preferred resources")
return emptyGVR, err
logger.V(4).Info("failed to get registered preferred resources", "err", err.Error())
}
for _, serverresource := range serverresources {
for _, resource := range serverresource.APIResources {