From 5d71fc264ec993c97458e4f2cc5e36f1772769ed Mon Sep 17 00:00:00 2001 From: Zhiwei Yin Date: Thu, 29 May 2025 10:12:26 +0800 Subject: [PATCH] add hub qps and burst for work in the klusterlet Signed-off-by: Zhiwei Yin --- ...open-cluster-management.io_klusterlets.crd.yaml | 14 ++++++++++++++ operator/v1/types_klusterlet.go | 12 ++++++++++++ operator/v1/zz_generated.swagger_doc_generated.go | 2 ++ 3 files changed, 28 insertions(+) diff --git a/operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml b/operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml index 8b9b4418..d515ca11 100644 --- a/operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml +++ b/operator/v1/0000_00_operator.open-cluster-management.io_klusterlets.crd.yaml @@ -475,6 +475,20 @@ spec: - feature type: object type: array + hubKubeAPIBurst: + default: 100 + description: |- + HubKubeAPIBurst indicates the maximum burst of the throttle while talking with apiserver on the hub cluster. + If it is set empty, use the default value: 100 + format: int32 + type: integer + hubKubeAPIQPS: + default: 50 + description: |- + HubKubeAPIQPS indicates the maximum QPS while talking with apiserver on the hub cluster. + If it is set empty, use the default value: 50 + format: int32 + type: integer kubeAPIBurst: default: 100 description: |- diff --git a/operator/v1/types_klusterlet.go b/operator/v1/types_klusterlet.go index 75e50416..faa87f1d 100644 --- a/operator/v1/types_klusterlet.go +++ b/operator/v1/types_klusterlet.go @@ -292,6 +292,18 @@ type WorkAgentConfiguration struct { // +kubebuilder:default:=100 KubeAPIBurst int32 `json:"kubeAPIBurst,omitempty"` + // HubKubeAPIQPS indicates the maximum QPS while talking with apiserver on the hub cluster. + // If it is set empty, use the default value: 50 + // +optional + // +kubebuilder:default:=50 + HubKubeAPIQPS int32 `json:"hubKubeAPIQPS,omitempty"` + + // HubKubeAPIBurst indicates the maximum burst of the throttle while talking with apiserver on the hub cluster. + // If it is set empty, use the default value: 100 + // +optional + // +kubebuilder:default:=100 + HubKubeAPIBurst int32 `json:"hubKubeAPIBurst,omitempty"` + // AppliedManifestWorkEvictionGracePeriod is the eviction grace period the work agent will wait before // evicting the AppliedManifestWorks, whose corresponding ManifestWorks are missing on the hub cluster, from // the managed cluster. If not present, the default value of the work agent will be used. diff --git a/operator/v1/zz_generated.swagger_doc_generated.go b/operator/v1/zz_generated.swagger_doc_generated.go index 501054bb..49e19c57 100644 --- a/operator/v1/zz_generated.swagger_doc_generated.go +++ b/operator/v1/zz_generated.swagger_doc_generated.go @@ -347,6 +347,8 @@ var map_WorkAgentConfiguration = map[string]string{ "featureGates": "FeatureGates represents the list of feature gates for work If it is set empty, default feature gates will be used. If it is set, featuregate/Foo is an example of one item in FeatureGates:\n 1. If featuregate/Foo does not exist, registration-operator will discard it\n 2. If featuregate/Foo exists and is false by default. It is now possible to set featuregate/Foo=[false|true]\n 3. If featuregate/Foo exists and is true by default. If a cluster-admin upgrading from 1 to 2 wants to continue having featuregate/Foo=false,\n \the can set featuregate/Foo=false before upgrading. Let's say the cluster-admin wants featuregate/Foo=false.", "kubeAPIQPS": "KubeAPIQPS indicates the maximum QPS while talking with apiserver on the spoke cluster. If it is set empty, use the default value: 50", "kubeAPIBurst": "KubeAPIBurst indicates the maximum burst of the throttle while talking with apiserver on the spoke cluster. If it is set empty, use the default value: 100", + "hubKubeAPIQPS": "HubKubeAPIQPS indicates the maximum QPS while talking with apiserver on the hub cluster. If it is set empty, use the default value: 50", + "hubKubeAPIBurst": "HubKubeAPIBurst indicates the maximum burst of the throttle while talking with apiserver on the hub cluster. If it is set empty, use the default value: 100", "appliedManifestWorkEvictionGracePeriod": "AppliedManifestWorkEvictionGracePeriod is the eviction grace period the work agent will wait before evicting the AppliedManifestWorks, whose corresponding ManifestWorks are missing on the hub cluster, from the managed cluster. If not present, the default value of the work agent will be used.", "statusSyncInterval": "StatusSyncInterval is the interval for the work agent to check the status of ManifestWorks. Larger value means less frequent status sync and less api calls to the managed cluster, vice versa. The value(x) should be: 5s <= x <= 1h.", }