diff --git a/pkg/addon/controllers/addonconfiguration/addon_configuration_reconciler_test.go b/pkg/addon/controllers/addonconfiguration/addon_configuration_reconciler_test.go index 4c88c2a8c..69e72c153 100644 --- a/pkg/addon/controllers/addonconfiguration/addon_configuration_reconciler_test.go +++ b/pkg/addon/controllers/addonconfiguration/addon_configuration_reconciler_test.go @@ -26,7 +26,7 @@ import ( clusterv1alpha1 "open-cluster-management.io/api/cluster/v1alpha1" clusterv1beta1 "open-cluster-management.io/api/cluster/v1beta1" - amindex "open-cluster-management.io/ocm/pkg/addon/index" + addonindex "open-cluster-management.io/ocm/pkg/addon/index" "open-cluster-management.io/ocm/pkg/common/helpers" ) @@ -1243,7 +1243,7 @@ func TestAddonConfigReconcile(t *testing.T) { err := addonInformers.Addon().V1alpha1().ManagedClusterAddOns().Informer().AddIndexers( cache.Indexers{ - amindex.ManagedClusterAddonByName: amindex.IndexManagedClusterAddonByName, + addonindex.ManagedClusterAddonByName: addonindex.IndexManagedClusterAddonByName, }) if err != nil { t.Fatal(err) diff --git a/pkg/addon/controllers/addonconfiguration/cma_progressing_reconciler_test.go b/pkg/addon/controllers/addonconfiguration/cma_progressing_reconciler_test.go index 3bbcdb16c..ad4e6a69c 100644 --- a/pkg/addon/controllers/addonconfiguration/cma_progressing_reconciler_test.go +++ b/pkg/addon/controllers/addonconfiguration/cma_progressing_reconciler_test.go @@ -23,7 +23,7 @@ import ( clusterv1beta1 "open-cluster-management.io/api/cluster/v1beta1" "open-cluster-management.io/sdk-go/pkg/patcher" - amindex "open-cluster-management.io/ocm/pkg/addon/index" + addonindex "open-cluster-management.io/ocm/pkg/addon/index" "open-cluster-management.io/ocm/pkg/common/helpers" ) @@ -687,7 +687,7 @@ func TestMgmtAddonProgressingReconcile(t *testing.T) { err := addonInformers.Addon().V1alpha1().ManagedClusterAddOns().Informer().AddIndexers( cache.Indexers{ - amindex.ManagedClusterAddonByName: amindex.IndexManagedClusterAddonByName, + addonindex.ManagedClusterAddonByName: addonindex.IndexManagedClusterAddonByName, }) if err != nil { t.Fatal(err) diff --git a/pkg/addon/controllers/addonmanagement/controller_test.go b/pkg/addon/controllers/addonmanagement/controller_test.go index ebd2ec4f9..bd64887ce 100644 --- a/pkg/addon/controllers/addonmanagement/controller_test.go +++ b/pkg/addon/controllers/addonmanagement/controller_test.go @@ -20,7 +20,7 @@ import ( clusterv1informers "open-cluster-management.io/api/client/cluster/informers/externalversions" clusterv1beta1 "open-cluster-management.io/api/cluster/v1beta1" - amindex "open-cluster-management.io/ocm/pkg/addon/index" + addonindex "open-cluster-management.io/ocm/pkg/addon/index" ) func TestAddonInstallReconcile(t *testing.T) { @@ -230,7 +230,7 @@ func TestAddonInstallReconcile(t *testing.T) { err := addonInformers.Addon().V1alpha1().ManagedClusterAddOns().Informer().AddIndexers( cache.Indexers{ - amindex.ManagedClusterAddonByName: amindex.IndexManagedClusterAddonByName, + addonindex.ManagedClusterAddonByName: addonindex.IndexManagedClusterAddonByName, }) if err != nil { t.Fatal(err) diff --git a/pkg/operator/operators/klusterlet/controllers/klusterletcontroller/client_builder.go b/pkg/operator/operators/klusterlet/controllers/klusterletcontroller/client_builder.go index e6fac09db..601b443e6 100644 --- a/pkg/operator/operators/klusterlet/controllers/klusterletcontroller/client_builder.go +++ b/pkg/operator/operators/klusterlet/controllers/klusterletcontroller/client_builder.go @@ -36,7 +36,7 @@ type managedClusterClients struct { // Only used for Hosted mode to generate managed cluster kubeconfig // with minimum permission for registration and work. kubeconfig *rest.Config - kubeconfigSecretCreationTime *metav1.Time + kubeconfigSecretCreationTime metav1.Time } type managedClusterClientsBuilder struct { @@ -106,7 +106,7 @@ func (m *managedClusterClientsBuilder) build(ctx context.Context) (*managedClust clients := &managedClusterClients{ kubeconfig: managedKubeConfig, - kubeconfigSecretCreationTime: &creationTime, + kubeconfigSecretCreationTime: creationTime, } if clients.kubeClient, err = kubernetes.NewForConfig(managedKubeConfig); err != nil { diff --git a/pkg/operator/operators/klusterlet/controllers/klusterletcontroller/klusterlet_controller_test.go b/pkg/operator/operators/klusterlet/controllers/klusterletcontroller/klusterlet_controller_test.go index 15f59de00..d26c41c1e 100644 --- a/pkg/operator/operators/klusterlet/controllers/klusterletcontroller/klusterlet_controller_test.go +++ b/pkg/operator/operators/klusterlet/controllers/klusterletcontroller/klusterlet_controller_test.go @@ -1561,7 +1561,7 @@ func (f *fakeManagedClusterBuilder) build(_ context.Context) (*managedClusterCli CAData: []byte("test"), }, }, - kubeconfigSecretCreationTime: &creationTime, + kubeconfigSecretCreationTime: creationTime, }, nil }