diff --git a/apis/apps/v1alpha1/zz_generated.deepcopy.go b/apis/apps/v1alpha1/zz_generated.deepcopy.go
index baef66a2c64..862c1393196 100644
--- a/apis/apps/v1alpha1/zz_generated.deepcopy.go
+++ b/apis/apps/v1alpha1/zz_generated.deepcopy.go
@@ -25,15 +25,14 @@ along with this program. If not, see .
package v1alpha1
import (
+ workloadsv1alpha1 "github.com/apecloud/kubeblocks/apis/workloads/v1alpha1"
appsv1 "k8s.io/api/apps/v1"
- v1 "k8s.io/api/core/v1"
+ "k8s.io/api/core/v1"
rbacv1 "k8s.io/api/rbac/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/util/intstr"
-
- workloadsv1alpha1 "github.com/apecloud/kubeblocks/apis/workloads/v1alpha1"
)
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
diff --git a/apis/dataprotection/v1alpha1/zz_generated.deepcopy.go b/apis/dataprotection/v1alpha1/zz_generated.deepcopy.go
index 5f955a82a32..06449f5aa3a 100644
--- a/apis/dataprotection/v1alpha1/zz_generated.deepcopy.go
+++ b/apis/dataprotection/v1alpha1/zz_generated.deepcopy.go
@@ -25,7 +25,7 @@ along with this program. If not, see .
package v1alpha1
import (
- v1 "k8s.io/api/core/v1"
+ "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
diff --git a/apis/extensions/v1alpha1/zz_generated.deepcopy.go b/apis/extensions/v1alpha1/zz_generated.deepcopy.go
index eeec9922d51..dc6dc6af55e 100644
--- a/apis/extensions/v1alpha1/zz_generated.deepcopy.go
+++ b/apis/extensions/v1alpha1/zz_generated.deepcopy.go
@@ -26,7 +26,7 @@ package v1alpha1
import (
corev1 "k8s.io/api/core/v1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
diff --git a/apis/storage/v1alpha1/zz_generated.deepcopy.go b/apis/storage/v1alpha1/zz_generated.deepcopy.go
index 0ab972c839a..f22b9440108 100644
--- a/apis/storage/v1alpha1/zz_generated.deepcopy.go
+++ b/apis/storage/v1alpha1/zz_generated.deepcopy.go
@@ -25,7 +25,7 @@ along with this program. If not, see .
package v1alpha1
import (
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/apis/meta/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
diff --git a/apis/workloads/v1alpha1/zz_generated.deepcopy.go b/apis/workloads/v1alpha1/zz_generated.deepcopy.go
index 34e7c5f1212..f2a4dfdf03d 100644
--- a/apis/workloads/v1alpha1/zz_generated.deepcopy.go
+++ b/apis/workloads/v1alpha1/zz_generated.deepcopy.go
@@ -26,7 +26,7 @@ package v1alpha1
import (
corev1 "k8s.io/api/core/v1"
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+ "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
diff --git a/externalapis/preflight/v1beta2/zz_generated.deepcopy.go b/externalapis/preflight/v1beta2/zz_generated.deepcopy.go
index 395b99094bf..e1cbcb93528 100644
--- a/externalapis/preflight/v1beta2/zz_generated.deepcopy.go
+++ b/externalapis/preflight/v1beta2/zz_generated.deepcopy.go
@@ -26,7 +26,7 @@ package v1beta2
import (
troubleshootv1beta2 "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2"
- v1 "k8s.io/api/core/v1"
+ "k8s.io/api/core/v1"
runtime "k8s.io/apimachinery/pkg/runtime"
)
diff --git a/pkg/controller/component/convertor.go b/pkg/controller/component/convertor.go
index 014320d59ca..4bd4066de1d 100644
--- a/pkg/controller/component/convertor.go
+++ b/pkg/controller/component/convertor.go
@@ -124,12 +124,12 @@ func covertObject(convertors map[string]convertor, obj any, args ...any) error {
func typeofObject(obj any) reflect.Type {
val := reflect.ValueOf(obj)
if val.Kind() == reflect.Ptr {
- val = val.Elem()
+ return reflect.TypeOf(obj).Elem()
}
if val.Kind() != reflect.Struct {
panic("not a struct")
}
- return reflect.TypeOf(val)
+ return reflect.TypeOf(obj)
}
type convertor interface {