diff --git a/fleetshard/pkg/central/reconciler/reconciler.go b/fleetshard/pkg/central/reconciler/reconciler.go index eb06bfe75e..85ab54eb93 100644 --- a/fleetshard/pkg/central/reconciler/reconciler.go +++ b/fleetshard/pkg/central/reconciler/reconciler.go @@ -238,7 +238,7 @@ func (r *CentralReconciler) Reconcile(ctx context.Context, remoteCentral private } if remoteCentral.Metadata.DeletionTimestamp != "" { - return r.reconcileInstanceDeletion(ctx, remoteCentral, central) + return r.reconcileInstanceDeletion(ctx, &remoteCentral, central) } namespaceLabels := map[string]string{ @@ -307,7 +307,7 @@ func (r *CentralReconciler) Reconcile(ctx context.Context, remoteCentral private return status, nil } -func (r *CentralReconciler) reconcileInstanceDeletion(ctx context.Context, remoteCentral private.ManagedCentral, central *v1alpha1.Central) (*private.DataPlaneCentralStatus, error) { +func (r *CentralReconciler) reconcileInstanceDeletion(ctx context.Context, remoteCentral *private.ManagedCentral, central *v1alpha1.Central) (*private.DataPlaneCentralStatus, error) { remoteCentralName := remoteCentral.Metadata.Name remoteCentralNamespace := remoteCentral.Metadata.Namespace @@ -460,7 +460,7 @@ func getRouteStatus(ingress *openshiftRouteV1.RouteIngress) private.DataPlaneCen } } -func (r *CentralReconciler) ensureCentralDeleted(ctx context.Context, remoteCentral private.ManagedCentral, central *v1alpha1.Central) (bool, error) { +func (r *CentralReconciler) ensureCentralDeleted(ctx context.Context, remoteCentral *private.ManagedCentral, central *v1alpha1.Central) (bool, error) { globalDeleted := true if r.useRoutes { reencryptRouteDeleted, err := r.ensureReencryptRouteDeleted(ctx, central.GetNamespace()) @@ -872,8 +872,8 @@ func (r *CentralReconciler) ensureChartResourcesExist(ctx context.Context, remot return nil } -func (r *CentralReconciler) ensureChartResourcesDeleted(ctx context.Context, remoteCentral private.ManagedCentral) (bool, error) { - vals, err := r.chartValues(remoteCentral) +func (r *CentralReconciler) ensureChartResourcesDeleted(ctx context.Context, remoteCentral *private.ManagedCentral) (bool, error) { + vals, err := r.chartValues(*remoteCentral) if err != nil { return false, fmt.Errorf("obtaining values for resources chart: %w", err) }