mirror of
https://github.com/kubernetes/client-go.git
synced 2025-09-11 12:02:30 +00:00
easy changes
Kubernetes-commit: 3fa7b7824abbf3daec1189b118b91b5bb726958f
This commit is contained in:
committed by
Kubernetes Publisher
parent
670b68600e
commit
cf012f20d0
@@ -21,7 +21,6 @@ import (
|
||||
|
||||
"k8s.io/apimachinery/pkg/api/meta"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
"k8s.io/client-go/pkg/api"
|
||||
restclient "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
@@ -73,9 +72,9 @@ func NewClientPool(config *restclient.Config, mapper meta.RESTMapper, apiPathRes
|
||||
|
||||
// Instantiates a new dynamic client pool with the given config.
|
||||
func NewDynamicClientPool(cfg *restclient.Config) ClientPool {
|
||||
// TODO: should use a dynamic RESTMapper built from the discovery results.
|
||||
restMapper := api.Registry.RESTMapper()
|
||||
return NewClientPool(cfg, restMapper, LegacyAPIPathResolverFunc)
|
||||
// restMapper is not needed when using LegacyAPIPathResolverFunc
|
||||
emptyMapper := meta.MultiRESTMapper{}
|
||||
return NewClientPool(cfg, emptyMapper, LegacyAPIPathResolverFunc)
|
||||
}
|
||||
|
||||
// ClientForGroupVersionResource uses the provided RESTMapper to identify the appropriate resource. Resource may
|
||||
|
Reference in New Issue
Block a user