From 7e305d91f92854ea1126a6f82a45b4cb880f6efc Mon Sep 17 00:00:00 2001 From: Daniil Antoshin Date: Mon, 23 Dec 2024 23:29:02 +0200 Subject: [PATCH] fix Signed-off-by: Daniil Antoshin --- .../pkg/controller/cvi/internal/source/http.go | 6 ------ .../pkg/controller/cvi/internal/source/object_ref.go | 7 +------ .../pkg/controller/cvi/internal/source/object_ref_vd.go | 6 ------ .../controller/cvi/internal/source/object_ref_vi_on_pvc.go | 6 ------ .../pkg/controller/cvi/internal/source/registry.go | 7 +------ .../pkg/controller/cvi/internal/source/upload.go | 7 +------ 6 files changed, 3 insertions(+), 36 deletions(-) diff --git a/images/virtualization-artifact/pkg/controller/cvi/internal/source/http.go b/images/virtualization-artifact/pkg/controller/cvi/internal/source/http.go index 737678d9a..775897e03 100644 --- a/images/virtualization-artifact/pkg/controller/cvi/internal/source/http.go +++ b/images/virtualization-artifact/pkg/controller/cvi/internal/source/http.go @@ -86,12 +86,6 @@ func (ds HTTPDataSource) Sync(ctx context.Context, cvi *virtv2.ClusterVirtualIma switch { case isDiskProvisioningFinished(condition): log.Info("Cluster virtual image provisioning finished: clean up") - ds.recorder.Event( - cvi, - corev1.EventTypeNormal, - virtv2.ReasonDataSourceDiskProvisioningCompleted, - "Disk provisioning finished: clean up", - ) cb.Status(metav1.ConditionTrue). Reason(cvicondition.Ready). diff --git a/images/virtualization-artifact/pkg/controller/cvi/internal/source/object_ref.go b/images/virtualization-artifact/pkg/controller/cvi/internal/source/object_ref.go index 9c7f3bf6f..e0096d6b9 100644 --- a/images/virtualization-artifact/pkg/controller/cvi/internal/source/object_ref.go +++ b/images/virtualization-artifact/pkg/controller/cvi/internal/source/object_ref.go @@ -126,12 +126,7 @@ func (ds ObjectRefDataSource) Sync(ctx context.Context, cvi *virtv2.ClusterVirtu switch { case isDiskProvisioningFinished(condition): - ds.recorder.Event( - cvi, - corev1.EventTypeNormal, - virtv2.ReasonDataSourceDiskProvisioningCompleted, - "Disk provisioning finished: clean up", - ) + log.Info("Cluster virtual image provisioning finished: clean up") cb. Status(metav1.ConditionTrue). diff --git a/images/virtualization-artifact/pkg/controller/cvi/internal/source/object_ref_vd.go b/images/virtualization-artifact/pkg/controller/cvi/internal/source/object_ref_vd.go index 13e8cfb53..3c6898327 100644 --- a/images/virtualization-artifact/pkg/controller/cvi/internal/source/object_ref_vd.go +++ b/images/virtualization-artifact/pkg/controller/cvi/internal/source/object_ref_vd.go @@ -76,12 +76,6 @@ func (ds ObjectRefVirtualDisk) Sync(ctx context.Context, cvi *virtv2.ClusterVirt switch { case isDiskProvisioningFinished(cb.Condition()): log.Info("Cluster virtual image provisioning finished: clean up") - ds.recorder.Event( - cvi, - corev1.EventTypeNormal, - virtv2.ReasonDataSourceDiskProvisioningCompleted, - "Image provisioning finished: clean up", - ) cb. Status(metav1.ConditionTrue). diff --git a/images/virtualization-artifact/pkg/controller/cvi/internal/source/object_ref_vi_on_pvc.go b/images/virtualization-artifact/pkg/controller/cvi/internal/source/object_ref_vi_on_pvc.go index 6e0a825a6..c9ece2e6e 100644 --- a/images/virtualization-artifact/pkg/controller/cvi/internal/source/object_ref_vi_on_pvc.go +++ b/images/virtualization-artifact/pkg/controller/cvi/internal/source/object_ref_vi_on_pvc.go @@ -71,12 +71,6 @@ func (ds ObjectRefVirtualImageOnPvc) Sync(ctx context.Context, cvi *virtv2.Clust switch { case isDiskProvisioningFinished(cb.Condition()): log.Info("Cluster virtual image provisioning finished: clean up") - ds.recorder.Event( - cvi, - corev1.EventTypeNormal, - virtv2.ReasonDataSourceDiskProvisioningCompleted, - "Image provisioning finished: clean up", - ) cb. Status(metav1.ConditionTrue). diff --git a/images/virtualization-artifact/pkg/controller/cvi/internal/source/registry.go b/images/virtualization-artifact/pkg/controller/cvi/internal/source/registry.go index 69503abbb..8e1bea301 100644 --- a/images/virtualization-artifact/pkg/controller/cvi/internal/source/registry.go +++ b/images/virtualization-artifact/pkg/controller/cvi/internal/source/registry.go @@ -90,12 +90,7 @@ func (ds RegistryDataSource) Sync(ctx context.Context, cvi *virtv2.ClusterVirtua switch { case isDiskProvisioningFinished(condition): - ds.recorder.Event( - cvi, - corev1.EventTypeNormal, - virtv2.ReasonDataSourceDiskProvisioningCompleted, - "Image provisioning finished: clean up", - ) + log.Info("Cluster virtual image provisioning finished: clean up") cb. Status(metav1.ConditionTrue). diff --git a/images/virtualization-artifact/pkg/controller/cvi/internal/source/upload.go b/images/virtualization-artifact/pkg/controller/cvi/internal/source/upload.go index 9ac8627a0..082ada09b 100644 --- a/images/virtualization-artifact/pkg/controller/cvi/internal/source/upload.go +++ b/images/virtualization-artifact/pkg/controller/cvi/internal/source/upload.go @@ -93,12 +93,7 @@ func (ds UploadDataSource) Sync(ctx context.Context, cvi *virtv2.ClusterVirtualI switch { case isDiskProvisioningFinished(condition): - ds.recorder.Event( - cvi, - corev1.EventTypeNormal, - virtv2.ReasonDataSourceDiskProvisioningCompleted, - "Image provisioning finished: clean up", - ) + log.Info("Cluster virtual image provisioning finished: clean up") cb. Status(metav1.ConditionTrue).