Skip to content

Commit 9fde5cc

Browse files
committed
changed logic to remove custom labels if removed from CR
Signed-off-by: Alka Kumari <alkumari@redhat.com>
1 parent 8bdbea3 commit 9fde5cc

File tree

2 files changed

+219
-209
lines changed

2 files changed

+219
-209
lines changed

controllers/argocd/argocd_controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,9 @@ func (r *ReconcileArgoCD) internalReconcile(ctx context.Context, request ctrl.Re
325325
}
326326
}
327327

328-
// Process any stored removed labels for cleanup from managed resources
329-
if err := r.processRemovedLabels(argocd); err != nil {
330-
reqLogger.Error(err, "failed to process removed labels cleanup")
328+
// Process DropMetadata for namespace-based label cleanup
329+
if err := r.processDropMetadataForCleanup(argocd); err != nil {
330+
reqLogger.Error(err, "failed to process DropMetadata cleanup")
331331
// Don't fail the reconciliation, just log the error and continue
332332
}
333333

0 commit comments

Comments
 (0)