Repository: karmada-io/karmada

Issue:
[Umbrella] Update Karmada CI and Documentation
<!-- Please use this template while publishing a good first issue. Thanks!
-->

**Task description**:
Karmada released the latest version release-1.13 on Feb, 28. With the release of the new version, some of the ci and documentation in the Karmada repository are now outdated and need to be updated.

**Solution**:
tasks:
- Stop maintaining version 1.10 and maintain version 1.13 (@Pratham-B-Parlecha #6221)
   - [x] update ci-schedule-compatibility.yaml
          URL: https://github.com/karmada-io/karmada/blob/master/.github/workflows/ci-schedule-compatibility.yaml
   - [x] update dependabot.yaml
          URL: https://github.com/karmada-io/karmada/blob/master/.github/dependabot.yml
   - [x] update ci-image-scanning-on-schedule.yml
          URL: https://github.com/karmada-io/karmada/blob/master/.github/workflows/ci-image-scanning-on-schedule.yml

- Update [sample file](https://github.com/karmada-io/karmada/blob/master/operator/config/samples/karmada-sample.yaml) of Karmada operator (@Pratham-B-Parlecha #6221)
   - [x] Update imageTag of Karmada components from `v1.12.2` to `v1.13.0`

   



**Who can join or take the task**:

The good first issue is intended for `first-time contributors` to get started on his/her contributor journey.

After a contributor has successfully completed 1-2 good first issue's,
they should be ready to move on to `help wanted` items, saving the remaining `good first issue` for other new contributors.

**How to join or take the task**:

Just reply on the issue with the message `/assign` in a separate line.

Then, the issue will be assigned to you.

**How to ask for help**:

If you need help or have questions, please feel free to ask on this issue.
The issue author or other members of the community will guide you through the contribution process.

Hints from issue comments:
@Pratham-B-Parlecha: hey @zhzhuang-zju, can you assign this issue to  me
/assign@zhzhuang-zju: > hey @zhzhuang-zju, can you assign this issue to me

Sure, welcome!@zhzhuang-zju: @Pratham-B-Parlecha Hello, how's the task going?@Pratham-B-Parlecha: @zhzhuang-zju tasks is going good almost done @zhzhuang-zju: Great! Feel free to ask if you have any questions.@zhzhuang-zju: @Pratham-B-Parlecha Kindly ask how the task is progressing. `Dependabot` will update the dependencies of the in-maintenance release every Monday. Therefore, I hope that the relevant changes can be completed before next Monday so that the above update task can be successfully finished. If there are any blocking points, please feel free to let me know.

Solution patch:
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index 910a48158..31f5b4a90 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -19,18 +19,18 @@ updates:
 
 - package-ecosystem: docker
   directory: /cluster/images/
-  target-branch: "release-1.12"
+  target-branch: "release-1.13"
   schedule:
     interval: weekly
 
 - package-ecosystem: docker
   directory: /cluster/images/
-  target-branch: "release-1.11"
+  target-branch: "release-1.12"
   schedule:
     interval: weekly
 
 - package-ecosystem: docker
   directory: /cluster/images/
-  target-branch: "release-1.10"
+  target-branch: "release-1.11"
   schedule:
     interval: weekly
diff --git a/.github/workflows/ci-image-scanning-on-schedule.yml b/.github/workflows/ci-image-scanning-on-schedule.yml
index e94a396a0..1ed59753d 100644
--- a/.github/workflows/ci-image-scanning-on-schedule.yml
+++ b/.github/workflows/ci-image-scanning-on-schedule.yml
@@ -27,7 +27,7 @@ jobs:
           - karmada-search
           - karmada-operator
           - karmada-metrics-adapter
-        karmada-version: [ release-1.12, release-1.11, release-1.10 ]
+        karmada-version: [ release-1.13, release-1.12, release-1.11 ]
     steps:
       - name: checkout code
         uses: actions/checkout@v4
diff --git a/.github/workflows/ci-schedule-compatibility.yaml b/.github/workflows/ci-schedule-compatibility.yaml
index e0b0cd1c8..ad364d190 100644
--- a/.github/workflows/ci-schedule-compatibility.yaml
+++ b/.github/workflows/ci-schedule-compatibility.yaml
@@ -20,7 +20,7 @@ jobs:
       fail-fast: false
       matrix:
         kubeapiserver-version: [ v1.23.4, v1.24.2, v1.25.0, v1.26.0, v1.27.3, v1.28.0, v1.29.0, v1.30.0, v1.31.0 ]
-        karmada-version: [ master, release-1.12, release-1.11, release-1.10 ]
+        karmada-version: [ master, release-1.13, release-1.12, release-1.11 ]
     env:
       KARMADA_APISERVER_VERSION: ${{ matrix.kubeapiserver-version }}
     steps:
diff --git a/charts/karmada/templates/pre-install-job.yaml b/charts/karmada/templates/pre-install-job.yaml
index 4862252cd..f87adbce3 100644
--- a/charts/karmada/templates/pre-install-job.yaml
+++ b/charts/karmada/templates/pre-install-job.yaml
@@ -182,6 +182,58 @@ data:
     {{- $.Files.Get $path | nindent 8 }}
   {{ end }}
 
+---
+apiVersion: v1
+kind: ServiceAccount
+metadata:
+  name: {{ $name }}-hook-job
+  namespace: {{ $namespace }}
+  annotations:
+    "helm.sh/hook": pre-install
+    "helm.sh/hook-weight": "1"
+  {{- if "karmada.preInstallJob.labels" }}
+  labels:
+    {{- include "karmada.preInstallJob.labels" . | nindent 4 }}
+  {{- end }}
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+  name: {{ $name }}-hook-job
+  annotations:
+    "helm.sh/hook": pre-install
+    "helm.sh/hook-weight": "1"
+  {{- if "karmada.preInstallJob.labels" }}
+  labels:
+    {{- include "karmada.preInstallJob.labels" . | nindent 4 }}
+  {{- end }}
+rules:
+  - apiGroups: ['*']
+    resources: ['*']
+    verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
+  - nonResourceURLs: ['*']
+    verbs: ["get"]
+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  name: {{ $name }}-hook-job
+  annotations:
+    "helm.sh/hook": pre-install
+    "helm.sh/hook-weight": "1"
+  {{- if "karmada.preInstallJob.labels" }}
+  labels:
+    {{- include "karmada.preInstallJob.labels" . | nindent 4 }}
+  {{- end }}
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: {{ $name }}-hook-job
+subjects:
+  - kind: ServiceAccount
+    name: {{ $name }}-hook-job
+    namespace: {{ $namespace }}
+
 {{- if eq .Values.certs.mode "custom" }}
 ---
 apiVersion: v1
@@ -446,56 +498,5 @@ spec:
       - name: configs
         emptyDir: {}
 ---
-apiVersion: v1
-kind: ServiceAccount
-metadata:
-  name: {{ $name }}-hook-job
-  namespace: {{ $namespace }}
-  annotations:
-    "helm.sh/hook": pre-install
-    "helm.sh/hook-weight": "1"
-  {{- if "karmada.preInstallJob.labels" }}
-  labels:
-    {{- include "karmada.preInstallJob.labels" . | nindent 4 }}
-  {{- end }}
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRole
-metadata:
-  name: {{ $name }}-hook-job
-  annotations:
-    "helm.sh/hook": pre-install
-    "helm.sh/hook-weight": "1"
-  {{- if "karmada.preInstallJob.labels" }}
-  labels:
-    {{- include "karmada.preInstallJob.labels" . | nindent 4 }}
-  {{- end }}
-rules:
-  - apiGroups: ['*']
-    resources: ['*']
-    verbs: ["get", "watch", "list", "create", "update", "patch", "delete"]
-  - nonResourceURLs: ['*']
-    verbs: ["get"]
----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRoleBinding
-metadata:
-  name: {{ $name }}-hook-job
-  annotations:
-    "helm.sh/hook": pre-install
-    "helm.sh/hook-weight": "1"
-  {{- if "karmada.preInstallJob.labels" }}
-  labels:
-    {{- include "karmada.preInstallJob.labels" . | nindent 4 }}
-  {{- end }}
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: ClusterRole
-  name: {{ $name }}-hook-job
-subjects:
-  - kind: ServiceAccount
-    name: {{ $name }}-hook-job
-    namespace: {{ $namespace }}
----
 {{- end }}
 {{- end }}
diff --git a/cmd/agent/app/agent.go b/cmd/agent/app/agent.go
index ad547891d..fc35ef8c5 100644
--- a/cmd/agent/app/agent.go
+++ b/cmd/agent/app/agent.go
@@ -28,6 +28,7 @@ import (
 	"k8s.io/client-go/informers"
 	kubeclientset "k8s.io/client-go/kubernetes"
 	"k8s.io/client-go/rest"
+	"k8s.io/client-go/util/flowcontrol"
 	cliflag "k8s.io/component-base/cli/flag"
 	"k8s.io/component-base/term"
 	"k8s.io/klog/v2"
@@ -140,8 +141,7 @@ func run(ctx context.Context, opts *options.Options) error {
 	if err != nil {
 		return fmt.Errorf("error building kubeconfig of karmada control plane: %w", err)
 	}
-	controlPlaneRestConfig.QPS, controlPlaneRestConfig.Burst = opts.KubeAPIQPS, opts.KubeAPIBurst
-
+	controlPlaneRestConfig.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(opts.KubeAPIQPS, opts.KubeAPIBurst)
 	clusterConfig, err := controllerruntime.GetConfig()
 	if err != nil {
 		return fmt.Errorf("error building kubeconfig of member cluster: %w", err)
diff --git a/cmd/aggregated-apiserver/app/options/options.go b/cmd/aggregated-apiserver/app/options/options.go
index 8505618de..a79144caa 100644
--- a/cmd/aggregated-apiserver/app/options/options.go
+++ b/cmd/aggregated-apiserver/app/options/options.go
@@ -36,6 +36,7 @@ import (
 	utilfeature "k8s.io/apiserver/pkg/util/feature"
 	utilversion "k8s.io/apiserver/pkg/util/version"
 	"k8s.io/client-go/kubernetes"
+	"k8s.io/client-go/util/flowcontrol"
 	"k8s.io/klog/v2"
 	netutils "k8s.io/utils/net"
 
@@ -120,7 +121,7 @@ func (o *Options) Run(ctx context.Context) error {
 	}
 
 	restConfig := config.GenericConfig.ClientConfig
-	restConfig.QPS, restConfig.Burst = o.KubeAPIQPS, o.KubeAPIBurst
+	restConfig.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(o.KubeAPIQPS, o.KubeAPIBurst)
 	secretLister := config.GenericConfig.SharedInformerFactory.Core().V1().Secrets().Lister()
 	config.GenericConfig.EffectiveVersion = utilversion.NewEffectiveVersion("1.0")
 
diff --git a/cmd/controller-manager/app/controllermanager.go b/cmd/controller-manager/app/controllermanager.go
index effc7a13d..9f705290c 100644
--- a/cmd/controller-manager/app/controllermanager.go
+++ b/cmd/controller-manager/app/controllermanager.go
@@ -29,6 +29,7 @@ import (
 	"k8s.io/client-go/informers"
 	kubeclientset "k8s.io/client-go/kubernetes"
 	"k8s.io/client-go/rest"
+	"k8s.io/client-go/util/flowcontrol"
 	cliflag "k8s.io/component-base/cli/flag"
 	"k8s.io/component-base/term"
 	"k8s.io/klog/v2"
@@ -144,7 +145,7 @@ func Run(ctx context.Context, opts *options.Options) error {
 	if err != nil {
 		panic(err)
 	}
-	controlPlaneRestConfig.QPS, controlPlaneRestConfig.Burst = opts.KubeAPIQPS, opts.KubeAPIBurst
+	controlPlaneRestConfig.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(opts.KubeAPIQPS, opts.KubeAPIBurst)
 	controllerManager, err := controllerruntime.NewManager(controlPlaneRestConfig, controllerruntime.Options{
 		Logger:                     klog.Background(),
 		Scheme:                     gclient.NewSchema(),
diff --git a/cmd/descheduler/app/descheduler.go b/cmd/descheduler/app/descheduler.go
index 416e12f9d..9f3db2ea9 100644
--- a/cmd/descheduler/app/descheduler.go
+++ b/cmd/descheduler/app/descheduler.go
@@ -31,6 +31,7 @@ import (
 	"k8s.io/client-go/tools/clientcmd"
 	"k8s.io/client-go/tools/leaderelection"
 	"k8s.io/client-go/tools/leaderelection/resourcelock"
+	"k8s.io/client-go/util/flowcontrol"
 	cliflag "k8s.io/component-base/cli/flag"
 	"k8s.io/component-base/term"
 	"k8s.io/klog/v2"
@@ -134,7 +135,7 @@ func run(opts *options.Options, stopChan <-chan struct{}) error {
 	if err != nil {
 		return fmt.Errorf("error building kubeconfig: %s", err.Error())
 	}
-	restConfig.QPS, restConfig.Burst = opts.KubeAPIQPS, opts.KubeAPIBurst
+	restConfig.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(opts.KubeAPIQPS, opts.KubeAPIBurst)
 
 	karmadaClient := karmadaclientset.NewForConfigOrDie(restConfig)
 	kubeClient := kubernetes.NewForConfigOrDie(restConfig)
diff --git a/cmd/karmada-search/app/karmada-search.go b/cmd/karmada-search/app/karmada-search.go
index bec4bf442..2806e05f4 100644
--- a/cmd/karmada-search/app/karmada-search.go
+++ b/cmd/karmada-search/app/karmada-search.go
@@ -33,6 +33,7 @@ import (
 	genericoptions "k8s.io/apiserver/pkg/server/options"
 	utilversion "k8s.io/apiserver/pkg/util/version"
 	"k8s.io/client-go/rest"
+	"k8s.io/client-go/util/flowcontrol"
 	cliflag "k8s.io/component-base/cli/flag"
 	"k8s.io/component-base/term"
 	"k8s.io/klog/v2"
@@ -179,8 +180,7 @@ func config(o *options.Options, outOfTreeRegistryOptions ...Option) (*search.Con
 		return nil, err
 	}
 
-	serverConfig.ClientConfig.QPS = o.KubeAPIQPS
-	serverConfig.ClientConfig.Burst = o.KubeAPIBurst
+	serverConfig.ClientConfig.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(o.KubeAPIQPS, o.KubeAPIBurst)
 	serverConfig.Config.EffectiveVersion = utilversion.NewEffectiveVersion("1.0")
 
 	httpClient, err := rest.HTTPClientFor(serverConfig.ClientConfig)
diff --git a/cmd/metrics-adapter/app/options/options.go b/cmd/metrics-adapter/app/options/options.go
index c75e4071d..62560fba6 100755
--- a/cmd/metrics-adapter/app/options/options.go
+++ b/cmd/metrics-adapter/app/options/options.go
@@ -28,6 +28,7 @@ import (
 	"k8s.io/client-go/informers"
 	"k8s.io/client-go/kubernetes"
 	"k8s.io/client-go/tools/clientcmd"
+	"k8s.io/client-go/util/flowcontrol"
 	"k8s.io/component-base/metrics"
 	"k8s.io/component-base/metrics/legacyregistry"
 	"k8s.io/klog/v2"
@@ -128,7 +129,7 @@ func (o *Options) Config(stopCh <-chan struct{}) (*metricsadapter.MetricsServer,
 		klog.Errorf("Unable to build restConfig: %v", err)
 		return nil, err
 	}
-	restConfig.QPS, restConfig.Burst = o.KubeAPIQPS, o.KubeAPIBurst
+	restConfig.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(o.KubeAPIQPS, o.KubeAPIBurst)
 
 	karmadaClient := karmadaclientset.NewForConfigOrDie(restConfig)
 	factory := informerfactory.NewSharedInformerFactory(karmadaClient, 0)
diff --git a/cmd/scheduler-estimator/app/scheduler-estimator.go b/cmd/scheduler-estimator/app/scheduler-estimator.go
index 9e990da0b..97fc9ad32 100644
--- a/cmd/scheduler-estimator/app/scheduler-estimator.go
+++ b/cmd/scheduler-estimator/app/scheduler-estimator.go
@@ -29,6 +29,7 @@ import (
 	"k8s.io/client-go/dynamic"
 	"k8s.io/client-go/kubernetes"
 	"k8s.io/client-go/tools/clientcmd"
+	"k8s.io/client-go/util/flowcontrol"
 	cliflag "k8s.io/component-base/cli/flag"
 	"k8s.io/component-base/term"
 	"k8s.io/klog/v2"
@@ -121,7 +122,7 @@ func run(ctx context.Context, opts *options.Options) error {
 	if err != nil {
 		return fmt.Errorf("error building kubeconfig: %s", err.Error())
 	}
-	restConfig.QPS, restConfig.Burst = opts.ClusterAPIQPS, opts.ClusterAPIBurst
+	restConfig.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(opts.ClusterAPIQPS, opts.ClusterAPIBurst)
 
 	kubeClient := kubernetes.NewForConfigOrDie(restConfig)
 	dynamicClient := dynamic.NewForConfigOrDie(restConfig)
diff --git a/cmd/scheduler/app/scheduler.go b/cmd/scheduler/app/scheduler.go
index 1ecf2aca2..6b23a12c2 100644
--- a/cmd/scheduler/app/scheduler.go
+++ b/cmd/scheduler/app/scheduler.go
@@ -32,6 +32,7 @@ import (
 	"k8s.io/client-go/tools/clientcmd"
 	"k8s.io/client-go/tools/leaderelection"
 	"k8s.io/client-go/tools/leaderelection/resourcelock"
+	"k8s.io/client-go/util/flowcontrol"
 	cliflag "k8s.io/component-base/cli/flag"
 	"k8s.io/component-base/term"
 	"k8s.io/klog/v2"
@@ -146,7 +147,7 @@ func run(opts *options.Options, stopChan <-chan struct{}, registryOptions ...Opt
 	if err != nil {
 		return fmt.Errorf("error building kubeconfig: %s", err.Error())
 	}
-	restConfig.QPS, restConfig.Burst = opts.KubeAPIQPS, opts.KubeAPIBurst
+	restConfig.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(opts.KubeAPIQPS, opts.KubeAPIBurst)
 
 	dynamicClientSet := dynamic.NewForConfigOrDie(restConfig)
 	karmadaClient := karmadaclientset.NewForConfigOrDie(restConfig)
diff --git a/cmd/webhook/app/webhook.go b/cmd/webhook/app/webhook.go
index 1c96151fb..843287599 100644
--- a/cmd/webhook/app/webhook.go
+++ b/cmd/webhook/app/webhook.go
@@ -24,6 +24,7 @@ import (
 	"net/http"
 
 	"github.com/spf13/cobra"
+	"k8s.io/client-go/util/flowcontrol"
 	cliflag "k8s.io/component-base/cli/flag"
 	"k8s.io/component-base/term"
 	"k8s.io/klog/v2"
@@ -116,7 +117,7 @@ func Run(ctx context.Context, opts *options.Options) error {
 	if err != nil {
 		panic(err)
 	}
-	config.QPS, config.Burst = opts.KubeAPIQPS, opts.KubeAPIBurst
+	config.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(opts.KubeAPIQPS, opts.KubeAPIBurst)
 
 	hookManager, err := controllerruntime.NewManager(config, controllerruntime.Options{
 		Logger: klog.Background(),
diff --git a/operator/config/samples/karmada.yaml b/operator/config/samples/karmada.yaml
index b84930db9..466eb588a 100644
--- a/operator/config/samples/karmada.yaml
+++ b/operator/config/samples/karmada.yaml
@@ -34,19 +34,19 @@ spec:
       serviceSubnet: 10.96.0.0/12
     karmadaAggregatedAPIServer:
       imageRepository: docker.io/karmada/karmada-aggregated-apiserver
-      imageTag: v1.12.2
+      imageTag: v1.13.0
       replicas: 1
     karmadaControllerManager:
       imageRepository: docker.io/karmada/karmada-controller-manager
-      imageTag: v1.12.2
+      imageTag: v1.13.0
       replicas: 1
     karmadaScheduler:
       imageRepository: docker.io/karmada/karmada-scheduler
-      imageTag: v1.12.2
+      imageTag: v1.13.0
       replicas: 1
     karmadaWebhook:
       imageRepository: docker.io/karmada/karmada-webhook
-      imageTag: v1.12.2
+      imageTag: v1.13.0
       replicas: 1
     kubeControllerManager:
       imageRepository: registry.k8s.io/kube-controller-manager
@@ -54,15 +54,15 @@ spec:
       replicas: 1
     karmadaMetricsAdapter:
       imageRepository: docker.io/karmada/karmada-metrics-adapter
-      imageTag: v1.12.2
+      imageTag: v1.13.0
       replicas: 2
     # karmadaSearch: # the component `Karmadasearch` is not installed by default, if you need to install it, uncomment it and note the formatting
       # imageRepository: docker.io/karmada/karmada-search
-      # imageTag: v1.12.2
+      # imageTag: v1.13.0
       # replicas: 1
     # karmadaDescheduler: # the component `KarmadaDescheduler` is not installed by default, if you need to install it, uncomment it and note the formatting
       # imageRepository: docker.io/karmada/karmada-descheduler
-      # imageTag: v1.12.2
+      # imageTag: v1.13.0
       # replicas: 1
   hostCluster:
     networking:



Test patch:
diff --git a/test/e2e/suites/operator/api_sidecar_test.go b/test/e2e/suites/operator/api_sidecar_test.go
new file mode 100644
index 000000000..e04edcb94
--- /dev/null
+++ b/test/e2e/suites/operator/api_sidecar_test.go
@@ -0,0 +1,105 @@
+/*
+Copyright 2025 The Karmada Authors.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package e2e
+
+import (
+	"context"
+
+	"github.com/onsi/ginkgo/v2"
+	"github.com/onsi/gomega"
+	appsv1 "k8s.io/api/apps/v1"
+	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"k8s.io/apimachinery/pkg/util/rand"
+
+	operatorv1alpha1 "github.com/karmada-io/karmada/operator/pkg/apis/operator/v1alpha1"
+)
+
+var _ = ginkgo.Describe("API server sidecar configuration testing", func() {
+	var karmadaName string
+	var apiserver *appsv1.Deployment
+	var sidecarContainer corev1.Container
+	var err error
+
+	ginkgo.Context("API server sidecar configuration testing", func() {
+		ginkgo.AfterEach(func() {
+			err = operatorClient.OperatorV1alpha1().Karmadas(testNamespace).Delete(context.TODO(), karmadaName, metav1.DeleteOptions{})
+			gomega.Expect(err).ShouldNot(gomega.HaveOccurred())
+		})
+
+		ginkgo.It("Custom API server sidecar configuration", func() {
+			ginkgo.By("Deploy a Karmada instance with API server sidecar configuration", func() {
+				karmadaName = KarmadaInstanceNamePrefix + rand.String(RandomStrLength)
+				mutateFn := func(karmada *operatorv1alpha1.Karmada) {
+					karmada.Spec.Components.KarmadaAPIServer = &operatorv1alpha1.KarmadaAPIServer{
+						SidecarContainers: []corev1.Container{
+							{
+								Name:  "foo",
+								Image: "busybox:latest",
+								Command: []string{
+									"sh",
+									"-c",
+									"while true; do echo 'Sidecar container is running'; sleep 10; done",
+								},
+							},
+						},
+						ExtraArgs: map[string]string{
+							"authorization-mode": "RBAC",
+						},
+					}
+				}
+				InitializeKarmadaInstance(operatorClient, testNamespace, karmadaName, mutateFn)
+			})
+
+			ginkgo.By("Check if API server sidecar configuration works", func() {
+				apiserver, err = kubeClient.AppsV1().Deployments(testNamespace).Get(context.TODO(), karmadaName+"-apiserver", metav1.GetOptions{})
+				gomega.Expect(err).ShouldNot(gomega.HaveOccurred())
+				containers := apiserver.Spec.Template.Spec.Containers
+				gomega.Expect(len(containers)).Should(gomega.Equal(2))
+				sidecarContainer = getContainer(containers, "foo")
+				gomega.Expect(sidecarContainer).ShouldNot(gomega.Equal(corev1.Container{}))
+			})
+
+			ginkgo.By("Check if the configuration of the main container will not be applied to the sidecar container", func() {
+				targetCommand := "--authorization-mode=RBAC"
+				containers := apiserver.Spec.Template.Spec.Containers
+				mainContainer := getContainer(containers, "kube-apiserver")
+				gomega.Expect(mainContainer).ShouldNot(gomega.Equal(corev1.Container{}))
+				gomega.Expect(isCommandExist(mainContainer, targetCommand)).Should(gomega.Equal(true))
+				gomega.Expect(isCommandExist(sidecarContainer, targetCommand)).Should(gomega.Equal(false), "the configuration of the main container should not be applied to the sidecar container")
+			})
+		})
+	})
+})
+
+func getContainer(containers []corev1.Container, name string) corev1.Container {
+	for _, container := range containers {
+		if container.Name == name {
+			return container
+		}
+	}
+	return corev1.Container{}
+}
+
+func isCommandExist(container corev1.Container, command string) bool {
+	for _, c := range container.Command {
+		if c == command {
+			return true
+		}
+	}
+	return false
+}
diff --git a/test/e2e/suites/operator/suite_test.go b/test/e2e/suites/operator/suite_test.go
index f8da1d170..bba453dde 100644
--- a/test/e2e/suites/operator/suite_test.go
+++ b/test/e2e/suites/operator/suite_test.go
@@ -31,6 +31,7 @@ import (
 	"k8s.io/client-go/kubernetes"
 	"k8s.io/client-go/rest"
 
+	operatorv1alpha1 "github.com/karmada-io/karmada/operator/pkg/apis/operator/v1alpha1"
 	operator "github.com/karmada-io/karmada/operator/pkg/generated/clientset/versioned"
 	"github.com/karmada-io/karmada/pkg/util"
 	"github.com/karmada-io/karmada/test/e2e/framework"
@@ -133,8 +134,11 @@ func cleanupTestNamespace(namespace string, kubeClient kubernetes.Interface) err
 }
 
 // InitializeKarmadaInstance initializes a karmada instance.
-func InitializeKarmadaInstance(client operator.Interface, namespace, name string) {
+func InitializeKarmadaInstance(client operator.Interface, namespace, name string, mutateFns ...func(karmada *operatorv1alpha1.Karmada)) {
 	karmada := helper.NewKarmada(namespace, name)
+	for _, mutateFn := range mutateFns {
+		mutateFn(karmada)
+	}
 	now := time.Now()
 	err := operatorresource.CreateKarmadaInstance(client, karmada)
 	gomega.Expect(err).ShouldNot(gomega.HaveOccurred())