mirror of
https://github.com/open-cluster-management-io/ocm.git
synced 2026-02-14 10:00:11 +00:00
create a separate rest config for gc metadata client (#1013)
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m22s
Post / coverage (push) Failing after 26m41s
Post / images (amd64) (push) Failing after 3m34s
Post / images (arm64) (push) Failing after 2m47s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 41s
Some checks failed
Scorecard supply-chain security / Scorecard analysis (push) Failing after 1m22s
Post / coverage (push) Failing after 26m41s
Post / images (amd64) (push) Failing after 3m34s
Post / images (arm64) (push) Failing after 2m47s
Post / image manifest (push) Has been skipped
Post / trigger clusteradm e2e (push) Has been skipped
Close stale issues and PRs / stale (push) Successful in 41s
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import (
|
||||
kubeinformers "k8s.io/client-go/informers"
|
||||
"k8s.io/client-go/kubernetes"
|
||||
"k8s.io/client-go/metadata"
|
||||
"k8s.io/client-go/rest"
|
||||
cpclientset "sigs.k8s.io/cluster-inventory-api/client/clientset/versioned"
|
||||
cpinformerv1alpha1 "sigs.k8s.io/cluster-inventory-api/client/informers/externalversions"
|
||||
|
||||
@@ -98,7 +99,11 @@ func (m *HubManagerOptions) RunControllerManager(ctx context.Context, controller
|
||||
return err
|
||||
}
|
||||
|
||||
metadataClient, err := metadata.NewForConfig(controllerContext.KubeConfig)
|
||||
// copy a separate config for gc controller and increase the gc controller's throughput.
|
||||
metadataKubeConfig := rest.CopyConfig(controllerContext.KubeConfig)
|
||||
metadataKubeConfig.QPS = controllerContext.KubeConfig.QPS * 2
|
||||
metadataKubeConfig.Burst = controllerContext.KubeConfig.Burst * 2
|
||||
metadataClient, err := metadata.NewForConfig(metadataKubeConfig)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user