Skip to content

Commit

Permalink
Merge pull request #3 from seatgeek/ak-ssa
Browse files Browse the repository at this point in the history
Set field managers for server side apply
  • Loading branch information
avinashkatamreddy-sg authored May 2, 2024
2 parents 1604198 + 59d3954 commit 93fe112
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion controller/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,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)

Expand Down
3 changes: 1 addition & 2 deletions controller/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -322,7 +321,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") {
Expand Down

0 comments on commit 93fe112

Please sign in to comment.