You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, SSA is opt-in either at application-level or at resource-level. However, to workaround argoproj/argo-cd#11143, I need to use ServerSideApply=false for a specific resource while SSA is enabled for all other resources.
Currently it does app-enabled || resource-enabled.
diff --git a/pkg/diff/diff.go b/pkg/diff/diff.go--- pkg/diff/diff.go+++ pkg/diff/diff.go@@ -87,17 +87,21 @@
// dependency with the kube package that blocks the usage of constants
// from common package. common package needs to be refactored and exclude
// dependency from kube.
syncOptAnnotation := "argocd.argoproj.io/sync-options"
- ssaAnnotation := "ServerSideApply=true"+ ssaEnabledAnnotation := "ServerSideApply=true"+ ssaDisabledAnnotation := "ServerSideApply=false"
// structuredMergeDiff is mainly used as a feature flag to enable
// calculating diffs using the structured-merge-diff library
// used in k8s while performing server-side applies. It checks the
// given diff Option or if the desired state resource has the
// Server-Side apply sync option annotation enabled.
structuredMergeDiff := o.structuredMergeDiff ||
- (config != nil && resource.HasAnnotationOption(config, syncOptAnnotation, ssaAnnotation))+ (config != nil && resource.HasAnnotationOption(config, syncOptAnnotation, ssaEnabledAnnotation))+ if structuredMergeDiff && config != nil && resource.HasAnnotationOption(config, syncOptAnnotation, ssaDisabledAnnotation) {+ structuredMergeDiff = false+ }
if structuredMergeDiff {
r, err := StructuredMergeDiff(config, live, o.gvkParser, o.manager)
if err != nil {
return nil, fmt.Errorf("error calculating structured merge diff: %w", err)
Currently, SSA is opt-in either at application-level or at resource-level. However, to workaround argoproj/argo-cd#11143, I need to use
ServerSideApply=false
for a specific resource while SSA is enabled for all other resources.Currently it does
app-enabled || resource-enabled
.gitops-engine/pkg/diff/diff.go
Line 91 in 98ccd3d
gitops-engine/pkg/diff/diff.go
Lines 98 to 99 in 98ccd3d
The text was updated successfully, but these errors were encountered: