ResourceGetter v1beta1 (#5416)
* add resource getter & reader Signed-off-by: Wenhao Zhou <wenhaozhou@yunify.com> * add resource v1beta1 handler * delete gvrToGvk map instead of using the dynamicRESTMapper for getting gvk, and rename the ResourceLister to ResourceGetter * add unregisteredMiddleware filter Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> * add secret contains benchmark & add fieldSelector to resourcev1beta1 Signed-off-by: Wenhao Zhou <wenhaozhou@yunify.com> * delete crds models Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> * delete parameterExtractor and instead of requestInfo Signed-off-by: Wenhao Zhou <wenhaozhou@yunify.com> * add benchmark test * move fieldSelector to DefaultObjectMetaFilter Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> * move fieldSelector to DefaultObjectMetaFilter * change registeredGv type to set Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> * update filter chains Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> * fix fieldSelector cannot work Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> * fix: list known type do not need served label Signed-off-by: wenhaozhou <wenhaozhou@yunify.com> --------- Signed-off-by: Wenhao Zhou <wenhaozhou@yunify.com> Signed-off-by: wenhaozhou <wenhaozhou@yunify.com>
This commit is contained in:
@@ -24,6 +24,8 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
|
||||
|
||||
openpitrixv1 "kubesphere.io/kubesphere/pkg/kapis/openpitrix/v1"
|
||||
"kubesphere.io/kubesphere/pkg/utils/clusterclient"
|
||||
|
||||
@@ -248,7 +250,12 @@ func (s *ServerRunOptions) NewAPIServer(stopCh <-chan struct{}) (*apiserver.APIS
|
||||
}
|
||||
})
|
||||
|
||||
apiServer.RuntimeCache, err = runtimecache.New(apiServer.KubernetesClient.Config(), runtimecache.Options{Scheme: sch})
|
||||
mapper, err := apiutil.NewDynamicRESTMapper(apiServer.KubernetesClient.Config())
|
||||
if err != nil {
|
||||
klog.Fatalf("unable create dynamic RESTMapper: %v", err)
|
||||
}
|
||||
|
||||
apiServer.RuntimeCache, err = runtimecache.New(apiServer.KubernetesClient.Config(), runtimecache.Options{Scheme: sch, Mapper: mapper})
|
||||
if err != nil {
|
||||
klog.Fatalf("unable to create controller runtime cache: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user