Skip to content

Commit

Permalink
Pass remoteCentral by pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
rhybrillou committed Jun 12, 2023
1 parent a5dc288 commit 853df7a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fleetshard/pkg/central/reconciler/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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())
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 853df7a

Please sign in to comment.