From 2879096b332b7bc3f9fb031fcccb73791978e21a Mon Sep 17 00:00:00 2001 From: Avinash Katamreddy Date: Thu, 2 May 2024 07:40:39 -0700 Subject: [PATCH] patch for ssa --- controller/state.go | 2 +- controller/sync.go | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/controller/state.go b/controller/state.go index 4be03900f268a..d773bd2f9c604 100644 --- a/controller/state.go +++ b/controller/state.go @@ -625,7 +625,7 @@ func (m *appStateManager) CompareAppState(app *v1alpha1.Application, project *v1 conditions = append(conditions, v1alpha1.ApplicationCondition{Type: v1alpha1.ApplicationConditionUnknownError, Message: err.Error(), LastTransitionTime: &now}) } diffConfigBuilder.WithGVKParser(gvkParser) - diffConfigBuilder.WithManager(common.ArgoCDSSAManager) + diffConfigBuilder.WithManager(app.GetName() + "-" + app.GetNamespace()) diffConfigBuilder.WithServerSideDiff(serverSideDiff) diff --git a/controller/sync.go b/controller/sync.go index 40285dec887f8..2a5fc8b70858c 100644 --- a/controller/sync.go +++ b/controller/sync.go @@ -9,7 +9,6 @@ import ( "sync/atomic" "time" - cdcommon "github.com/argoproj/argo-cd/v2/common" "k8s.io/apimachinery/pkg/util/strategicpatch" "github.com/argoproj/gitops-engine/pkg/sync" @@ -316,7 +315,7 @@ func (m *appStateManager) SyncAppState(app *v1alpha1.Application, state *v1alpha sync.WithPrunePropagationPolicy(&prunePropagationPolicy), sync.WithReplace(syncOp.SyncOptions.HasOption(common.SyncOptionReplace)), sync.WithServerSideApply(syncOp.SyncOptions.HasOption(common.SyncOptionServerSideApply)), - sync.WithServerSideApplyManager(cdcommon.ArgoCDSSAManager), + sync.WithServerSideApplyManager(app.GetName() + "-" + app.GetNamespace()), } if syncOp.SyncOptions.HasOption("CreateNamespace=true") {