diff --git a/controllers/gitopsservice_controller.go b/controllers/gitopsservice_controller.go index 134d20c48..6533e1b46 100644 --- a/controllers/gitopsservice_controller.go +++ b/controllers/gitopsservice_controller.go @@ -231,7 +231,7 @@ func (r *ReconcileGitopsService) Reconcile(ctx context.Context, request reconcil return reconcile.Result{}, err } } else { - needUpdate, updateNameSpace := ensurePodSecurityLabels(argocdNS) + needUpdate, updateNameSpace := ensurePodSecurityLabels(namespaceRef) if needUpdate { err = r.Client.Update(context.TODO(), updateNameSpace) if err != nil {