Repository: openyurtio/openyurt
Pull request #2054 (2024-05-26 12:03:37)

improve restmapper for gateway resource
<!--  Thanks for sending a pull request!  Here are some tips for you:
https://github.com/openyurtio/openyurt/blob/master/CONTRIBUTING.md 
-->

#### What type of PR is this?
> Uncomment only one `/kind <>` line, hit enter to put that in a new line, and remove leading whitespace from that line:
> /kind bug
> /kind documentation
> /kind enhancement
> /kind good-first-issue
> /kind feature
> /kind question
> /kind design
> /sig ai
> /sig iot
> /sig network
> /sig storage

/kind enhancement

#### What this PR does / why we need it:
because plural of gateway is gateways instead of gatewaies in raven, so we need to deal with gateway resource specially in restmapper of yurthub component.

#### Which issue(s) this PR fixes:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #

#### Special notes for your reviewer:
<!--
use this label to assign your reviewer
/assign @your_reviewer
-->

#### Does this PR introduce a user-facing change?
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".

-->
```release-note

```

#### other Note
<!--
If your current PR is still working in process, start the PR title name with [WIP], such as: [WIP] add new crd for yurt-app-manager
If the PR title name begins with [WIP], OpenYurt-bot automatically adds a do-not-merge/work-in-progress label for your pr 
-->


sonarcloud[bot]: ## [![Quality Gate Passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/qg-passed-20px.png 'Quality Gate Passed')](https://sonarcloud.io/dashboard?id=openyurtio_openyurt&pullRequest=2054) **Quality Gate passed**  
Issues  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 New issues](https://sonarcloud.io/project/issues?id=openyurtio_openyurt&pullRequest=2054&resolved=false&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/accepted-16px.png '') [0 Accepted issues](https://sonarcloud.io/project/issues?id=openyurtio_openyurt&pullRequest=2054&resolutions=WONTFIX)

Measures  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=openyurtio_openyurt&pullRequest=2054&resolved=false&sinceLeakPeriod=true)  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/no-data-16px.png '') No data about Coverage  
![](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/passed-16px.png '') [0.1% Duplication on New Code](https://sonarcloud.io/component_measures?id=openyurtio_openyurt&pullRequest=2054&metric=new_duplicated_lines_density&view=list)  
  
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=openyurtio_openyurt&pullRequest=2054)



Patch:
diff --git a/Makefile b/Makefile
index fc187702..5400c9f5 100644
--- a/Makefile
+++ b/Makefile
@@ -200,10 +200,10 @@ newcontroller:
 CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
 .PHONY: controller-gen
 controller-gen: ## Download controller-gen locally if necessary.
-ifeq ("$(shell $(CONTROLLER_GEN) --version 2> /dev/null)", "Version: v0.7.0")
+ifeq ("$(shell $(CONTROLLER_GEN) --version 2> /dev/null)", "Version: v0.13.0")
 else
 	rm -rf $(CONTROLLER_GEN)
-	$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.7.0)
+	$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.13.0)
 endif
 
 .PHONY: kubectl
diff --git a/charts/yurt-manager/crds/apps.openyurt.io_nodebuckets.yaml b/charts/yurt-manager/crds/apps.openyurt.io_nodebuckets.yaml
index 7b8883ce..8f6facf6 100644
--- a/charts/yurt-manager/crds/apps.openyurt.io_nodebuckets.yaml
+++ b/charts/yurt-manager/crds/apps.openyurt.io_nodebuckets.yaml
@@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.7.0
-  creationTimestamp: null
+    controller-gen.kubebuilder.io/version: v0.13.0
   name: nodebuckets.apps.openyurt.io
 spec:
   group: apps.openyurt.io
@@ -69,9 +68,3 @@ spec:
     storage: true
     subresources:
       status: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/charts/yurt-manager/crds/apps.openyurt.io_nodepools.yaml b/charts/yurt-manager/crds/apps.openyurt.io_nodepools.yaml
index c9e0fc89..30171352 100644
--- a/charts/yurt-manager/crds/apps.openyurt.io_nodepools.yaml
+++ b/charts/yurt-manager/crds/apps.openyurt.io_nodepools.yaml
@@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.7.0
-  creationTimestamp: null
+    controller-gen.kubebuilder.io/version: v0.13.0
   name: nodepools.apps.openyurt.io
 spec:
   group: apps.openyurt.io
@@ -91,6 +90,7 @@ spec:
                       description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
                       type: object
                   type: object
+                  x-kubernetes-map-type: atomic
                 taints:
                   description: If specified, the Taints will be added to all nodes.
                   items:
@@ -244,9 +244,3 @@ spec:
           namespace: kube-system
           name: yurt-manager-webhook-service
           path: /convert
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/charts/yurt-manager/crds/apps.openyurt.io_yurtappdaemons.yaml b/charts/yurt-manager/crds/apps.openyurt.io_yurtappdaemons.yaml
index 33a15442..f4ad3d76 100644
--- a/charts/yurt-manager/crds/apps.openyurt.io_yurtappdaemons.yaml
+++ b/charts/yurt-manager/crds/apps.openyurt.io_yurtappdaemons.yaml
@@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.7.0
-  creationTimestamp: null
+    controller-gen.kubebuilder.io/version: v0.13.0
   name: yurtappdaemons.apps.openyurt.io
 spec:
   group: apps.openyurt.io
@@ -102,6 +101,7 @@ spec:
                       are ANDed.
                     type: object
                 type: object
+                x-kubernetes-map-type: atomic
               revisionHistoryLimit:
                 description: Indicates the number of histories to be conserved. If
                   unspecified, defaults to 10.
@@ -152,6 +152,7 @@ spec:
                       are ANDed.
                     type: object
                 type: object
+                x-kubernetes-map-type: atomic
               workloadTemplate:
                 description: WorkloadTemplate describes the pool that will be created.
                 properties:
@@ -267,9 +268,3 @@ spec:
     storage: true
     subresources:
       status: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/charts/yurt-manager/crds/apps.openyurt.io_yurtappoverriders.yaml b/charts/yurt-manager/crds/apps.openyurt.io_yurtappoverriders.yaml
index c21075bd..dbe685ea 100644
--- a/charts/yurt-manager/crds/apps.openyurt.io_yurtappoverriders.yaml
+++ b/charts/yurt-manager/crds/apps.openyurt.io_yurtappoverriders.yaml
@@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.7.0
-  creationTimestamp: null
+    controller-gen.kubebuilder.io/version: v0.13.0
   name: yurtappoverriders.apps.openyurt.io
 spec:
   group: apps.openyurt.io
@@ -139,9 +138,3 @@ spec:
     served: true
     storage: true
     subresources: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/charts/yurt-manager/crds/apps.openyurt.io_yurtappsets.yaml b/charts/yurt-manager/crds/apps.openyurt.io_yurtappsets.yaml
index de14abb2..cafac1a5 100644
--- a/charts/yurt-manager/crds/apps.openyurt.io_yurtappsets.yaml
+++ b/charts/yurt-manager/crds/apps.openyurt.io_yurtappsets.yaml
@@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.7.0
-  creationTimestamp: null
+    controller-gen.kubebuilder.io/version: v0.13.0
   name: yurtappsets.apps.openyurt.io
 spec:
   group: apps.openyurt.io
@@ -87,6 +86,7 @@ spec:
                       description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
                       type: object
                   type: object
+                  x-kubernetes-map-type: atomic
                 topology:
                   description: Topology describes the pods distribution detail between each of pools.
                   properties:
@@ -144,6 +144,7 @@ spec:
                                   type: object
                                 type: array
                             type: object
+                            x-kubernetes-map-type: atomic
                           patch:
                             description: Indicates the patch for the templateSpec Now support strategic merge path :https://kubernetes.io/docs/tasks/manage-kubernetes-objects/update-api-object-kubectl-patch/#notes-on-the-strategic-merge-patch Patch takes precedence over Replicas fields If the Patch also modifies the Replicas, use the Replicas value in the Patch
                             type: object
@@ -357,6 +358,7 @@ spec:
                       description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
                       type: object
                   type: object
+                  x-kubernetes-map-type: atomic
                 pools:
                   description: Pools is a list of selected nodepools specified with nodepool id in which workloads should be deployed in. It is primarily used for compatibility with v1alpha1 version and NodePoolSelector should be preferred to choose nodepools
                   items:
@@ -428,6 +430,7 @@ spec:
                                 description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
                                 type: object
                             type: object
+                            x-kubernetes-map-type: atomic
                           pools:
                             description: Pools is a list of selected nodepools specified with nodepool id in which workloads should be adjusted. Pools is not recommended and NodePoolSelector should be preferred
                             items:
@@ -559,9 +562,3 @@ spec:
           namespace: kube-system
           name: yurt-manager-webhook-service
           path: /convert
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/charts/yurt-manager/crds/apps.openyurt.io_yurtstaticsets.yaml b/charts/yurt-manager/crds/apps.openyurt.io_yurtstaticsets.yaml
index 3ec4d8b5..db5c7732 100644
--- a/charts/yurt-manager/crds/apps.openyurt.io_yurtstaticsets.yaml
+++ b/charts/yurt-manager/crds/apps.openyurt.io_yurtstaticsets.yaml
@@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.7.0
-  creationTimestamp: null
+    controller-gen.kubebuilder.io/version: v0.13.0
   name: yurtstaticsets.apps.openyurt.io
 spec:
   group: apps.openyurt.io
@@ -116,9 +115,3 @@ spec:
     storage: true
     subresources:
       status: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/charts/yurt-manager/crds/iot.openyurt.io_platformadmins.yaml b/charts/yurt-manager/crds/iot.openyurt.io_platformadmins.yaml
index 65af525a..a0999d96 100644
--- a/charts/yurt-manager/crds/iot.openyurt.io_platformadmins.yaml
+++ b/charts/yurt-manager/crds/iot.openyurt.io_platformadmins.yaml
@@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.7.0
-  creationTimestamp: null
+    controller-gen.kubebuilder.io/version: v0.13.0
   name: platformadmins.iot.openyurt.io
 spec:
   group: iot.openyurt.io
@@ -154,6 +153,7 @@ spec:
                                 contains only "value". The requirements are ANDed.
                               type: object
                           type: object
+                          x-kubernetes-map-type: atomic
                         strategy:
                           description: The deployment strategy to use to replace existing
                             pods with new ones.
@@ -360,6 +360,7 @@ spec:
                                                       type: object
                                                     type: array
                                                 type: object
+                                                x-kubernetes-map-type: atomic
                                               weight:
                                                 description: Weight associated with
                                                   matching the corresponding nodeSelectorTerm,
@@ -487,10 +488,12 @@ spec:
                                                       type: object
                                                     type: array
                                                 type: object
+                                                x-kubernetes-map-type: atomic
                                               type: array
                                           required:
                                           - nodeSelectorTerms
                                           type: object
+                                          x-kubernetes-map-type: atomic
                                       type: object
                                     podAffinity:
                                       description: Describes pod affinity scheduling
@@ -595,6 +598,7 @@ spec:
                                                           are ANDed.
                                                         type: object
                                                     type: object
+                                                    x-kubernetes-map-type: atomic
                                                   namespaceSelector:
                                                     description: A label query over
                                                       the set of namespaces that the
@@ -673,6 +677,7 @@ spec:
                                                           are ANDed.
                                                         type: object
                                                     type: object
+                                                    x-kubernetes-map-type: atomic
                                                   namespaces:
                                                     description: namespaces specifies
                                                       a static list of namespace names
@@ -802,6 +807,7 @@ spec:
                                                       are ANDed.
                                                     type: object
                                                 type: object
+                                                x-kubernetes-map-type: atomic
                                               namespaceSelector:
                                                 description: A label query over the
                                                   set of namespaces that the term
@@ -871,6 +877,7 @@ spec:
                                                       are ANDed.
                                                     type: object
                                                 type: object
+                                                x-kubernetes-map-type: atomic
                                               namespaces:
                                                 description: namespaces specifies
                                                   a static list of namespace names
@@ -1004,6 +1011,7 @@ spec:
                                                           are ANDed.
                                                         type: object
                                                     type: object
+                                                    x-kubernetes-map-type: atomic
                                                   namespaceSelector:
                                                     description: A label query over
                                                       the set of namespaces that the
@@ -1082,6 +1090,7 @@ spec:
                                                           are ANDed.
                                                         type: object
                                                     type: object
+                                                    x-kubernetes-map-type: atomic
                                                   namespaces:
                                                     description: namespaces specifies
                                                       a static list of namespace names
@@ -1211,6 +1220,7 @@ spec:
                                                       are ANDed.
                                                     type: object
                                                 type: object
+                                                x-kubernetes-map-type: atomic
                                               namespaceSelector:
                                                 description: A label query over the
                                                   set of namespaces that the term
@@ -1280,6 +1290,7 @@ spec:
                                                       are ANDed.
                                                     type: object
                                                 type: object
+                                                x-kubernetes-map-type: atomic
                                               namespaces:
                                                 description: namespaces specifies
                                                   a static list of namespace names
@@ -1413,6 +1424,7 @@ spec:
                                                   required:
                                                   - key
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                                 fieldRef:
                                                   description: 'Selects a field of
                                                     the pod: supports metadata.name,
@@ -1434,6 +1446,7 @@ spec:
                                                   required:
                                                   - fieldPath
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                                 resourceFieldRef:
                                                   description: 'Selects a resource
                                                     of the container: only resources
@@ -1464,6 +1477,7 @@ spec:
                                                   required:
                                                   - resource
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                                 secretKeyRef:
                                                   description: Selects a key of a
                                                     secret in the pod's namespace
@@ -1487,6 +1501,7 @@ spec:
                                                   required:
                                                   - key
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                               type: object
                                           required:
                                           - name
@@ -1522,6 +1537,7 @@ spec:
                                                     ConfigMap must be defined
                                                   type: boolean
                                               type: object
+                                              x-kubernetes-map-type: atomic
                                             prefix:
                                               description: An optional identifier
                                                 to prepend to each key in the ConfigMap.
@@ -1541,6 +1557,7 @@ spec:
                                                     Secret must be defined
                                                   type: boolean
                                               type: object
+                                              x-kubernetes-map-type: atomic
                                           type: object
                                         type: array
                                       image:
@@ -3028,6 +3045,7 @@ spec:
                                                   required:
                                                   - key
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                                 fieldRef:
                                                   description: 'Selects a field of
                                                     the pod: supports metadata.name,
@@ -3049,6 +3067,7 @@ spec:
                                                   required:
                                                   - fieldPath
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                                 resourceFieldRef:
                                                   description: 'Selects a resource
                                                     of the container: only resources
@@ -3079,6 +3098,7 @@ spec:
                                                   required:
                                                   - resource
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                                 secretKeyRef:
                                                   description: Selects a key of a
                                                     secret in the pod's namespace
@@ -3102,6 +3122,7 @@ spec:
                                                   required:
                                                   - key
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                               type: object
                                           required:
                                           - name
@@ -3137,6 +3158,7 @@ spec:
                                                     ConfigMap must be defined
                                                   type: boolean
                                               type: object
+                                              x-kubernetes-map-type: atomic
                                             prefix:
                                               description: An optional identifier
                                                 to prepend to each key in the ConfigMap.
@@ -3156,6 +3178,7 @@ spec:
                                                     Secret must be defined
                                                   type: boolean
                                               type: object
+                                              x-kubernetes-map-type: atomic
                                           type: object
                                         type: array
                                       image:
@@ -4522,6 +4545,7 @@ spec:
                                           kind, uid?'
                                         type: string
                                     type: object
+                                    x-kubernetes-map-type: atomic
                                   type: array
                                 initContainers:
                                   description: 'List of initialization containers
@@ -4633,6 +4657,7 @@ spec:
                                                   required:
                                                   - key
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                                 fieldRef:
                                                   description: 'Selects a field of
                                                     the pod: supports metadata.name,
@@ -4654,6 +4679,7 @@ spec:
                                                   required:
                                                   - fieldPath
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                                 resourceFieldRef:
                                                   description: 'Selects a resource
                                                     of the container: only resources
@@ -4684,6 +4710,7 @@ spec:
                                                   required:
                                                   - resource
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                                 secretKeyRef:
                                                   description: Selects a key of a
                                                     secret in the pod's namespace
@@ -4707,6 +4734,7 @@ spec:
                                                   required:
                                                   - key
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                               type: object
                                           required:
                                           - name
@@ -4742,6 +4770,7 @@ spec:
                                                     ConfigMap must be defined
                                                   type: boolean
                                               type: object
+                                              x-kubernetes-map-type: atomic
                                             prefix:
                                               description: An optional identifier
                                                 to prepend to each key in the ConfigMap.
@@ -4761,6 +4790,7 @@ spec:
                                                     Secret must be defined
                                                   type: boolean
                                               type: object
+                                              x-kubernetes-map-type: atomic
                                           type: object
                                         type: array
                                       image:
@@ -6666,6 +6696,7 @@ spec:
                                               only "value". The requirements are ANDed.
                                             type: object
                                         type: object
+                                        x-kubernetes-map-type: atomic
                                       matchLabelKeys:
                                         description: "MatchLabelKeys is a set of pod
                                           label keys to select the pods over which
@@ -6791,16 +6822,16 @@ spec:
                                           the spread constraint. - DoNotSchedule (default)
                                           tells the scheduler not to schedule it.
                                           - ScheduleAnyway tells the scheduler to
-                                          schedule the pod in any location,   but
-                                          giving higher precedence to topologies that
-                                          would help reduce the   skew. A constraint
-                                          is considered "Unsatisfiable" for an incoming
-                                          pod if and only if every possible node assignment
-                                          for that pod would violate "MaxSkew" on
-                                          some topology. For example, in a 3-zone
-                                          cluster, MaxSkew is set to 1, and pods with
-                                          the same labelSelector spread as 3/1/1:
-                                          | zone1 | zone2 | zone3 | | P P P |   P   |   P   |
+                                          schedule the pod in any location, but giving
+                                          higher precedence to topologies that would
+                                          help reduce the skew. A constraint is considered
+                                          "Unsatisfiable" for an incoming pod if and
+                                          only if every possible node assignment for
+                                          that pod would violate "MaxSkew" on some
+                                          topology. For example, in a 3-zone cluster,
+                                          MaxSkew is set to 1, and pods with the same
+                                          labelSelector spread as 3/1/1: | zone1 |
+                                          zone2 | zone3 | | P P P |   P   |   P   |
                                           If WhenUnsatisfiable is set to DoNotSchedule,
                                           incoming pod can only be scheduled to zone2(zone3)
                                           to become 3/2/1(3/1/2) as ActualSkew(2-1)
@@ -6975,6 +7006,7 @@ spec:
                                                   kind, uid?'
                                                 type: string
                                             type: object
+                                            x-kubernetes-map-type: atomic
                                           user:
                                             description: 'user is optional: User is
                                               the rados user name, default is admin
@@ -7014,6 +7046,7 @@ spec:
                                                   kind, uid?'
                                                 type: string
                                             type: object
+                                            x-kubernetes-map-type: atomic
                                           volumeID:
                                             description: 'volumeID used to identify
                                               the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md'
@@ -7103,6 +7136,7 @@ spec:
                                               the ConfigMap or its keys must be defined
                                             type: boolean
                                         type: object
+                                        x-kubernetes-map-type: atomic
                                       csi:
                                         description: csi (Container Storage Interface)
                                           represents ephemeral storage that is handled
@@ -7139,6 +7173,7 @@ spec:
                                                   kind, uid?'
                                                 type: string
                                             type: object
+                                            x-kubernetes-map-type: atomic
                                           readOnly:
                                             description: readOnly specifies a read-only
                                               configuration for the volume. Defaults
@@ -7204,6 +7239,7 @@ spec:
                                                   required:
                                                   - fieldPath
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                                 mode:
                                                   description: 'Optional: mode bits
                                                     used to set permissions on this
@@ -7259,6 +7295,7 @@ spec:
                                                   required:
                                                   - resource
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                               required:
                                               - path
                                               type: object
@@ -7303,20 +7340,19 @@ spec:
                                           is removed. \n Use this if: a) the volume
                                           is only needed while the pod runs, b) features
                                           of normal volumes like restoring from snapshot
-                                          or capacity    tracking are needed, c) the
+                                          or capacity tracking are needed, c) the
                                           storage driver is specified through a storage
                                           class, and d) the storage driver supports
-                                          dynamic volume provisioning through    a
-                                          PersistentVolumeClaim (see EphemeralVolumeSource
-                                          for more    information on the connection
-                                          between this volume type    and PersistentVolumeClaim).
-                                          \n Use PersistentVolumeClaim or one of the
-                                          vendor-specific APIs for volumes that persist
-                                          for longer than the lifecycle of an individual
-                                          pod. \n Use CSI for light-weight local ephemeral
-                                          volumes if the CSI driver is meant to be
-                                          used that way - see the documentation of
-                                          the driver for more information."
+                                          dynamic volume provisioning through a PersistentVolumeClaim
+                                          (see EphemeralVolumeSource for more information
+                                          on the connection between this volume type
+                                          and PersistentVolumeClaim). \n Use PersistentVolumeClaim
+                                          or one of the vendor-specific APIs for volumes
+                                          that persist for longer than the lifecycle
+                                          of an individual pod. \n Use CSI for light-weight
+                                          local ephemeral volumes if the CSI driver
+                                          is meant to be used that way - see the documentation
+                                          of the driver for more information."
                                         properties:
                                           volumeClaimTemplate:
                                             description: "Will be used to create a
@@ -7412,6 +7448,7 @@ spec:
                                                     - kind
                                                     - name
                                                     type: object
+                                                    x-kubernetes-map-type: atomic
                                                   dataSourceRef:
                                                     description: dataSourceRef specifies
                                                       the object from which to populate
@@ -7624,6 +7661,7 @@ spec:
                                                           are ANDed.
                                                         type: object
                                                     type: object
+                                                    x-kubernetes-map-type: atomic
                                                   storageClassName:
                                                     description: 'storageClassName
                                                       is the name of the StorageClass
@@ -7732,6 +7770,7 @@ spec:
                                                   kind, uid?'
                                                 type: string
                                             type: object
+                                            x-kubernetes-map-type: atomic
                                         required:
                                         - driver
                                         type: object
@@ -7943,6 +7982,7 @@ spec:
                                                   kind, uid?'
                                                 type: string
                                             type: object
+                                            x-kubernetes-map-type: atomic
                                           targetPortal:
                                             description: targetPortal is iSCSI Target
                                               Portal. The Portal is either an IP or
@@ -8153,6 +8193,7 @@ spec:
                                                         keys must be defined
                                                       type: boolean
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                                 downwardAPI:
                                                   description: downwardAPI information
                                                     about the downwardAPI data to
@@ -8190,6 +8231,7 @@ spec:
                                                             required:
                                                             - fieldPath
                                                             type: object
+                                                            x-kubernetes-map-type: atomic
                                                           mode:
                                                             description: 'Optional:
                                                               mode bits used to set
@@ -8257,6 +8299,7 @@ spec:
                                                             required:
                                                             - resource
                                                             type: object
+                                                            x-kubernetes-map-type: atomic
                                                         required:
                                                         - path
                                                         type: object
@@ -8342,6 +8385,7 @@ spec:
                                                         or its key must be defined
                                                       type: boolean
                                                   type: object
+                                                  x-kubernetes-map-type: atomic
                                                 serviceAccountToken:
                                                   description: serviceAccountToken
                                                     is information about the serviceAccountToken
@@ -8481,6 +8525,7 @@ spec:
                                                   kind, uid?'
                                                 type: string
                                             type: object
+                                            x-kubernetes-map-type: atomic
                                           user:
                                             description: 'user is the rados user name.
                                               Default is admin. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it'
@@ -8528,6 +8573,7 @@ spec:
                                                   kind, uid?'
                                                 type: string
                                             type: object
+                                            x-kubernetes-map-type: atomic
                                           sslEnabled:
                                             description: sslEnabled Flag enable/disable
                                               SSL communication with Gateway, default
@@ -8670,6 +8716,7 @@ spec:
                                                   kind, uid?'
                                                 type: string
                                             type: object
+                                            x-kubernetes-map-type: atomic
                                           volumeName:
                                             description: volumeName is the human-readable
                                               name of the StorageOS volume.  Volume
@@ -8948,14 +8995,14 @@ spec:
                                   Valid values are either: \n * Un-prefixed protocol
                                   names - reserved for IANA standard service names
                                   (as per RFC-6335 and https://www.iana.org/assignments/service-names).
-                                  \n * Kubernetes-defined prefixed names:   * 'kubernetes.io/h2c'
+                                  \n * Kubernetes-defined prefixed names: * 'kubernetes.io/h2c'
                                   - HTTP/2 over cleartext as described in https://www.rfc-editor.org/rfc/rfc7540
-                                  \  * 'kubernetes.io/ws'  - WebSocket over cleartext
+                                  * 'kubernetes.io/ws'  - WebSocket over cleartext
                                   as described in https://www.rfc-editor.org/rfc/rfc6455
-                                  \  * 'kubernetes.io/wss' - WebSocket over TLS as
-                                  described in https://www.rfc-editor.org/rfc/rfc6455
-                                  \n * Other protocols should use implementation-defined
-                                  prefixed names such as mycompany.com/my-custom-protocol."
+                                  * 'kubernetes.io/wss' - WebSocket over TLS as described
+                                  in https://www.rfc-editor.org/rfc/rfc6455 \n * Other
+                                  protocols should use implementation-defined prefixed
+                                  names such as mycompany.com/my-custom-protocol."
                                 type: string
                               name:
                                 description: The name of this port within the service.
@@ -9244,9 +9291,3 @@ spec:
     storage: true
     subresources:
       status: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/charts/yurt-manager/crds/network.openyurt.io_poolservices.yaml b/charts/yurt-manager/crds/network.openyurt.io_poolservices.yaml
index b12d0570..0ebbdb62 100644
--- a/charts/yurt-manager/crds/network.openyurt.io_poolservices.yaml
+++ b/charts/yurt-manager/crds/network.openyurt.io_poolservices.yaml
@@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.7.0
-  creationTimestamp: null
+    controller-gen.kubebuilder.io/version: v0.13.0
   name: poolservices.network.openyurt.io
 spec:
   group: network.openyurt.io
@@ -71,14 +70,12 @@ spec:
                   description: "Condition contains details for one aspect of the current
                     state of this API Resource. --- This struct is intended for direct
                     use as an array at the field path .status.conditions.  For example,
-                    \n \ttype FooStatus struct{ \t    // Represents the observations
-                    of a foo's current state. \t    // Known .status.conditions.type
-                    are: \"Available\", \"Progressing\", and \"Degraded\" \t    //
-                    +patchMergeKey=type \t    // +patchStrategy=merge \t    // +listType=map
-                    \t    // +listMapKey=type \t    Conditions []metav1.Condition
+                    \n type FooStatus struct{ // Represents the observations of a
+                    foo's current state. // Known .status.conditions.type are: \"Available\",
+                    \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
+                    // +listType=map // +listMapKey=type Conditions []metav1.Condition
                     `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
-                    protobuf:\"bytes,1,rep,name=conditions\"` \n \t    // other fields
-                    \t}"
+                    protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }"
                   properties:
                     lastTransitionTime:
                       description: lastTransitionTime is the last time the condition
@@ -168,8 +165,8 @@ spec:
                                   the service port The format of the error shall comply
                                   with the following rules: - built-in error values
                                   shall be specified in this file and those shall
-                                  use   CamelCase names - cloud provider specific
-                                  error values must have names that comply with the   format
+                                  use CamelCase names - cloud provider specific error
+                                  values must have names that comply with the format
                                   foo.example.com/CamelCase. --- The regex it matches
                                   is (dns1123SubdomainFmt/)?(qualifiedNameFmt)'
                                 maxLength: 316
@@ -201,9 +198,3 @@ spec:
     storage: true
     subresources:
       status: {}
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/charts/yurt-manager/crds/raven.openyurt.io_gateways.yaml b/charts/yurt-manager/crds/raven.openyurt.io_gateways.yaml
index 673876d6..37e49dd9 100644
--- a/charts/yurt-manager/crds/raven.openyurt.io_gateways.yaml
+++ b/charts/yurt-manager/crds/raven.openyurt.io_gateways.yaml
@@ -2,8 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
 kind: CustomResourceDefinition
 metadata:
   annotations:
-    controller-gen.kubebuilder.io/version: v0.7.0
-  creationTimestamp: null
+    controller-gen.kubebuilder.io/version: v0.13.0
   name: gateways.raven.openyurt.io
 spec:
   group: raven.openyurt.io
@@ -91,6 +90,7 @@ spec:
                       description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
                       type: object
                   type: object
+                  x-kubernetes-map-type: atomic
               required:
                 - endpoints
               type: object
@@ -224,6 +224,7 @@ spec:
                       description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
                       type: object
                   type: object
+                  x-kubernetes-map-type: atomic
                 proxyConfig:
                   description: ProxyConfig determine the l7 proxy configuration
                   properties:
@@ -327,9 +328,3 @@ spec:
           namespace: kube-system
           name: yurt-manager-webhook-service
           path: /convert
-status:
-  acceptedNames:
-    kind: ""
-    plural: ""
-  conditions: []
-  storedVersions: []
diff --git a/charts/yurt-manager/templates/yurt-manager-auto-generated.yaml b/charts/yurt-manager/templates/yurt-manager-auto-generated.yaml
index 3fe9f173..d5be3bad 100644
--- a/charts/yurt-manager/templates/yurt-manager-auto-generated.yaml
+++ b/charts/yurt-manager/templates/yurt-manager-auto-generated.yaml
@@ -9,7 +9,6 @@
 apiVersion: rbac.authorization.k8s.io/v1
 kind: Role
 metadata:
-  creationTimestamp: null
   name: yurt-manager-role
   namespace: {{ .Release.Namespace }}
 rules:
@@ -33,7 +32,6 @@ rules:
 apiVersion: rbac.authorization.k8s.io/v1
 kind: ClusterRole
 metadata:
-  creationTimestamp: null
   name: yurt-manager-role
 rules:
 - apiGroups:
@@ -548,7 +546,6 @@ rules:
 apiVersion: admissionregistration.k8s.io/v1
 kind: MutatingWebhookConfiguration
 metadata:
-  creationTimestamp: null
   name: yurt-manager-mutating-webhook-configuration
 webhooks:
 - admissionReviewVersions:
@@ -760,7 +757,6 @@ webhooks:
 apiVersion: admissionregistration.k8s.io/v1
 kind: ValidatingWebhookConfiguration
 metadata:
-  creationTimestamp: null
   name: yurt-manager-validating-webhook-configuration
 webhooks:
 - admissionReviewVersions:
diff --git a/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go
index cfe90275..680f3d5c 100644
--- a/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/apps/v1alpha1/zz_generated.deepcopy.go
@@ -1,5 +1,4 @@
 //go:build !ignore_autogenerated
-// +build !ignore_autogenerated
 
 /*
 Copyright 2023 The OpenYurt Authors.
diff --git a/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go b/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go
index bfef4f98..89af6b5d 100644
--- a/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go
+++ b/pkg/apis/apps/v1beta1/zz_generated.deepcopy.go
@@ -1,5 +1,4 @@
 //go:build !ignore_autogenerated
-// +build !ignore_autogenerated
 
 /*
 Copyright 2023 The OpenYurt Authors.
diff --git a/pkg/apis/calico/v3/doc.go b/pkg/apis/calico/v3/doc.go
index a4090732..c06a2a31 100644
--- a/pkg/apis/calico/v3/doc.go
+++ b/pkg/apis/calico/v3/doc.go
@@ -14,6 +14,4 @@ See the License for the specific language governing permissions and
 limitations under the License.
 */
 
-// +groupName=apiregistration.k8s.io
-
 package v3
diff --git a/pkg/apis/calico/v3/zz_generated.deepcopy.go b/pkg/apis/calico/v3/zz_generated.deepcopy.go
index 22a0931a..434110cc 100644
--- a/pkg/apis/calico/v3/zz_generated.deepcopy.go
+++ b/pkg/apis/calico/v3/zz_generated.deepcopy.go
@@ -1,5 +1,4 @@
 //go:build !ignore_autogenerated
-// +build !ignore_autogenerated
 
 /*
 Copyright 2023 The OpenYurt Authors.
diff --git a/pkg/apis/iot/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/iot/v1alpha1/zz_generated.deepcopy.go
index 3162ed46..3c781596 100644
--- a/pkg/apis/iot/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/iot/v1alpha1/zz_generated.deepcopy.go
@@ -1,5 +1,4 @@
 //go:build !ignore_autogenerated
-// +build !ignore_autogenerated
 
 /*
 Copyright 2023 The OpenYurt Authors.
@@ -428,7 +427,8 @@ func (in *DeviceSpec) DeepCopyInto(out *DeviceSpec) {
 			if val == nil {
 				(*out)[key] = nil
 			} else {
-				in, out := &val, &outVal
+				inVal := (*in)[key]
+				in, out := &inVal, &outVal
 				*out = make(ProtocolProperties, len(*in))
 				for key, val := range *in {
 					(*out)[key] = val
diff --git a/pkg/apis/iot/v1alpha2/zz_generated.deepcopy.go b/pkg/apis/iot/v1alpha2/zz_generated.deepcopy.go
index 5b6b4514..413cc562 100644
--- a/pkg/apis/iot/v1alpha2/zz_generated.deepcopy.go
+++ b/pkg/apis/iot/v1alpha2/zz_generated.deepcopy.go
@@ -1,5 +1,4 @@
 //go:build !ignore_autogenerated
-// +build !ignore_autogenerated
 
 /*
 Copyright 2023 The OpenYurt Authors.
diff --git a/pkg/apis/network/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/network/v1alpha1/zz_generated.deepcopy.go
index b8ebe2fc..1bd9c30f 100644
--- a/pkg/apis/network/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/network/v1alpha1/zz_generated.deepcopy.go
@@ -1,5 +1,4 @@
 //go:build !ignore_autogenerated
-// +build !ignore_autogenerated
 
 /*
 Copyright 2023 The OpenYurt Authors.
diff --git a/pkg/apis/raven/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/raven/v1alpha1/zz_generated.deepcopy.go
index c736ea95..10645b0a 100644
--- a/pkg/apis/raven/v1alpha1/zz_generated.deepcopy.go
+++ b/pkg/apis/raven/v1alpha1/zz_generated.deepcopy.go
@@ -1,5 +1,4 @@
 //go:build !ignore_autogenerated
-// +build !ignore_autogenerated
 
 /*
 Copyright 2023 The OpenYurt Authors.
diff --git a/pkg/apis/raven/v1beta1/zz_generated.deepcopy.go b/pkg/apis/raven/v1beta1/zz_generated.deepcopy.go
index 99e1cbb3..e36d82c5 100644
--- a/pkg/apis/raven/v1beta1/zz_generated.deepcopy.go
+++ b/pkg/apis/raven/v1beta1/zz_generated.deepcopy.go
@@ -1,5 +1,4 @@
 //go:build !ignore_autogenerated
-// +build !ignore_autogenerated
 
 /*
 Copyright 2023 The OpenYurt Authors.
diff --git a/pkg/yurthub/cachemanager/cache_manager.go b/pkg/yurthub/cachemanager/cache_manager.go
index bfa0a156..10897134 100644
--- a/pkg/yurthub/cachemanager/cache_manager.go
+++ b/pkg/yurthub/cachemanager/cache_manager.go
@@ -417,7 +417,7 @@ func (cm *cacheManager) saveWatchObject(ctx context.Context, info *apirequest.Re
 			}
 		case watch.Bookmark:
 			rv, _ := accessor.ResourceVersion(obj)
-			klog.Infof("get bookmark with rv %s for %s watch %s", rv, comp, info.Resource)
+			klog.V(4).Infof("get bookmark with rv %s for %s watch %s", rv, comp, info.Resource)
 		case watch.Error:
 			klog.Infof("unable to understand watch event %#v", obj)
 		}
diff --git a/pkg/yurthub/kubernetes/meta/restmapper.go b/pkg/yurthub/kubernetes/meta/restmapper.go
index 7c417310..291edf42 100644
--- a/pkg/yurthub/kubernetes/meta/restmapper.go
+++ b/pkg/yurthub/kubernetes/meta/restmapper.go
@@ -42,6 +42,10 @@ var (
 	// It is not updatable and is only used for the judgment of scheme resources
 	unsafeSchemeRESTMapper = NewDefaultRESTMapperFromScheme()
 	ErrGVRNotRecognized    = errors.New("GroupVersionResource is not recognized")
+
+	specifiedResources = []string{
+		"gateway",
+	}
 )
 
 // RESTMapperManager is responsible for managing different kind of RESTMapper
@@ -141,7 +145,7 @@ func (rm *RESTMapperManager) dynamicKindFor(gvr schema.GroupVersionResource) (sc
 // Used to delete the mapping relationship between GVR and GVK in dynamicRESTMapper
 func (rm *RESTMapperManager) deleteKind(gvk schema.GroupVersionKind) error {
 	kindName := strings.TrimSuffix(gvk.Kind, "List")
-	plural, singular := meta.UnsafeGuessKindToResource(gvk.GroupVersion().WithKind(kindName))
+	plural, singular := specifiedKindToResource(gvk.GroupVersion().WithKind(kindName))
 	rm.Lock()
 	delete(rm.dynamicRESTMapper, plural)
 	delete(rm.dynamicRESTMapper, singular)
@@ -193,7 +197,7 @@ func (rm *RESTMapperManager) DeleteKindFor(gvr schema.GroupVersionResource) erro
 func (rm *RESTMapperManager) UpdateKind(gvk schema.GroupVersionKind) error {
 	kindName := strings.TrimSuffix(gvk.Kind, "List")
 	gvk = gvk.GroupVersion().WithKind(kindName)
-	plural, singular := meta.UnsafeGuessKindToResource(gvk.GroupVersion().WithKind(kindName))
+	plural, singular := specifiedKindToResource(gvk.GroupVersion().WithKind(kindName))
 	// If it is not a built-in resource and it is not stored in DynamicRESTMapper, add it to DynamicRESTMapper
 	isScheme, t := rm.KindFor(singular)
 	if !isScheme && t.Empty() {
@@ -269,3 +273,23 @@ func IsSchemeResource(gvr schema.GroupVersionResource) bool {
 
 	return false
 }
+
+// specifiedKindToResource converts Kind to a resource name.
+// Broken. This method only "sort of" works when used outside of this package.  It assumes that Kinds and Resources match
+// and they aren't guaranteed to do so.
+func specifiedKindToResource(kind schema.GroupVersionKind) ( /*plural*/ schema.GroupVersionResource /*singular*/, schema.GroupVersionResource) {
+	kindName := kind.Kind
+	if len(kindName) == 0 {
+		return schema.GroupVersionResource{}, schema.GroupVersionResource{}
+	}
+	singularName := strings.ToLower(kindName)
+	singular := kind.GroupVersion().WithResource(singularName)
+
+	for _, skip := range specifiedResources {
+		if strings.HasSuffix(singularName, skip) {
+			return kind.GroupVersion().WithResource(singularName + "s"), singular
+		}
+	}
+
+	return meta.UnsafeGuessKindToResource(kind)
+}
diff --git a/pkg/yurthub/proxy/remote/loadbalancer.go b/pkg/yurthub/proxy/remote/loadbalancer.go
index 08228b13..2a4e3339 100644
--- a/pkg/yurthub/proxy/remote/loadbalancer.go
+++ b/pkg/yurthub/proxy/remote/loadbalancer.go
@@ -18,6 +18,7 @@ package remote
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"io"
 	"net/http"
@@ -387,7 +388,7 @@ func (lb *loadBalancer) cacheToLocal(req *http.Request, resp *http.Response) {
 	req = req.WithContext(ctx)
 	rc, prc := hubutil.NewDualReadCloser(req, resp.Body, true)
 	go func(req *http.Request, prc io.ReadCloser, stopCh <-chan struct{}) {
-		if err := lb.localCacheMgr.CacheResponse(req, prc, stopCh); err != nil {
+		if err := lb.localCacheMgr.CacheResponse(req, prc, stopCh); err != nil && !errors.Is(err, io.EOF) && !errors.Is(err, context.Canceled) {
 			klog.Errorf("lb could not cache req %s in local cache, %v", hubutil.ReqString(req), err)
 		}
 	}(req, prc, ctx.Done())
diff --git a/pkg/yurthub/proxy/util/util.go b/pkg/yurthub/proxy/util/util.go
index 0f55e00c..969f1f97 100644
--- a/pkg/yurthub/proxy/util/util.go
+++ b/pkg/yurthub/proxy/util/util.go
@@ -245,8 +245,12 @@ func WithRequestTrace(handler http.Handler) http.Handler {
 		start := time.Now()
 		defer func() {
 			duration := time.Since(start)
-			klog.Infof("%s with status code %d, spent %v", util.ReqString(req), wrapperRW.statusCode, duration)
-			// 'watch' & 'proxy' requets don't need to be monitored in metrics
+			if info.Resource == "leases" {
+				klog.V(5).Infof("%s with status code %d, spent %v", util.ReqString(req), wrapperRW.statusCode, duration)
+			} else {
+				klog.V(2).Infof("%s with status code %d, spent %v", util.ReqString(req), wrapperRW.statusCode, duration)
+			}
+			// 'watch' & 'proxy' requests don't need to be monitored in metrics
 			if info.Verb != "proxy" && info.Verb != "watch" {
 				metrics.Metrics.SetProxyLatencyCollector(client, info.Verb, info.Resource, info.Subresource, metrics.Apiserver_latency, int64(duration))
 			}
@@ -284,9 +288,17 @@ func WithMaxInFlightLimit(handler http.Handler, limit int) http.Handler {
 	}
 
 	return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) {
+		info, ok := apirequest.RequestInfoFrom(req.Context())
+		if !ok {
+			info = &apirequest.RequestInfo{}
+		}
 		select {
 		case reqChan <- true:
-			klog.V(2).Infof("%s, in flight requests: %d", util.ReqString(req), len(reqChan))
+			if info.Resource == "leases" {
+				klog.V(5).Infof("%s, in flight requests: %d", util.ReqString(req), len(reqChan))
+			} else {
+				klog.V(2).Infof("%s, in flight requests: %d", util.ReqString(req), len(reqChan))
+			}
 			defer func() {
 				<-reqChan
 				klog.V(5).Infof("%s request completed, left %d requests in flight", util.ReqString(req), len(reqChan))
diff --git a/pkg/yurthub/server/nonresource.go b/pkg/yurthub/server/nonresource.go
index 96f110a2..215e0be6 100644
--- a/pkg/yurthub/server/nonresource.go
+++ b/pkg/yurthub/server/nonresource.go
@@ -35,9 +35,11 @@ import (
 )
 
 var nonResourceReqPaths = map[string]storage.ClusterInfoType{
-	"/version":                       storage.Version,
-	"/apis/discovery.k8s.io/v1":      storage.APIResourcesInfo,
-	"/apis/discovery.k8s.io/v1beta1": storage.APIResourcesInfo,
+	"/version":                         storage.Version,
+	"/apis/discovery.k8s.io/v1":        storage.APIResourcesInfo,
+	"/apis/discovery.k8s.io/v1beta1":   storage.APIResourcesInfo,
+	"/apis/raven.openyurt.io/v1alpha1": storage.APIResourcesInfo,
+	"/apis/raven.openyurt.io/v1beta1":  storage.APIResourcesInfo,
 }
 
 type NonResourceHandler func(kubeClient *kubernetes.Clientset, sw cachemanager.StorageWrapper, path string) http.Handler


Test patch:
diff --git a/pkg/yurthub/kubernetes/meta/restmapper_test.go b/pkg/yurthub/kubernetes/meta/restmapper_test.go
index 84ddccc7..11f075a1 100644
--- a/pkg/yurthub/kubernetes/meta/restmapper_test.go
+++ b/pkg/yurthub/kubernetes/meta/restmapper_test.go
@@ -237,3 +237,31 @@ func dynamicRESTMapperToString(m map[schema.GroupVersionResource]schema.GroupVer
 	}
 	return resultMapper
 }
+
+func TestKindToResource(t *testing.T) {
+	testCases := []struct {
+		Kind             string
+		Plural, Singular string
+	}{
+		{Kind: "Pod", Plural: "pods", Singular: "pod"},
+
+		{Kind: "Gateway", Plural: "gateways", Singular: "gateway"},
+
+		{Kind: "ReplicationController", Plural: "replicationcontrollers", Singular: "replicationcontroller"},
+
+		// Add "ies" when ending with "y"
+		{Kind: "ImageRepository", Plural: "imagerepositories", Singular: "imagerepository"},
+		// Add "es" when ending with "s"
+		{Kind: "miss", Plural: "misses", Singular: "miss"},
+		// Add "s" otherwise
+		{Kind: "lowercase", Plural: "lowercases", Singular: "lowercase"},
+	}
+	for i, testCase := range testCases {
+		version := schema.GroupVersion{}
+
+		plural, singular := specifiedKindToResource(version.WithKind(testCase.Kind))
+		if singular != version.WithResource(testCase.Singular) || plural != version.WithResource(testCase.Plural) {
+			t.Errorf("%d: unexpected plural and singular: %v %v", i, plural, singular)
+		}
+	}
+}