Skip to content

Commit

Permalink
Add normalizer opts with the new version
Browse files Browse the repository at this point in the history
Signed-off-by: Alec Hinh <[email protected]>
  • Loading branch information
ahinh43 committed May 24, 2024
1 parent 9962bd2 commit 8592ba0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/checks/diff/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 8592ba0

Please sign in to comment.