From 8592ba0b7422ca82d0a0322acd67bdf4a33630c4 Mon Sep 17 00:00:00 2001 From: Alec Hinh Date: Fri, 24 May 2024 11:28:35 -0500 Subject: [PATCH] Add normalizer opts with the new version Signed-off-by: Alec Hinh --- pkg/checks/diff/diff.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/checks/diff/diff.go b/pkg/checks/diff/diff.go index f4503896..564d227f 100644 --- a/pkg/checks/diff/diff.go +++ b/pkg/checks/diff/diff.go @@ -14,6 +14,7 @@ import ( argoappv1 "github.com/argoproj/argo-cd/v2/pkg/apis/application/v1alpha1" "github.com/argoproj/argo-cd/v2/util/argo" argodiff "github.com/argoproj/argo-cd/v2/util/argo/diff" + "github.com/argoproj/argo-cd/v2/util/argo/normalizers" "github.com/argoproj/gitops-engine/pkg/diff" "github.com/argoproj/gitops-engine/pkg/sync/hook" "github.com/argoproj/gitops-engine/pkg/sync/ignore" @@ -196,9 +197,10 @@ func generateDiff(ctx context.Context, request checks.Request, argoSettings *set } ignoreAggregatedRoles := false + ignoreNormalizerOpts := normalizers.IgnoreNormalizerOpts{} diffConfig, err := argodiff.NewDiffConfigBuilder(). WithLogger(zerologr.New(&log.Logger)). - WithDiffSettings(request.App.Spec.IgnoreDifferences, overrides, ignoreAggregatedRoles). + WithDiffSettings(request.App.Spec.IgnoreDifferences, overrides, ignoreAggregatedRoles, ignoreNormalizerOpts). WithTracking(argoSettings.AppLabelKey, argoSettings.TrackingMethod). WithNoCache(). Build()