@@ -508,48 +508,23 @@ func syncManifestsSSA(ctx context.Context, objects []*unstructured.Unstructured,
508508 return err
509509 }
510510
511- ssaOptions := manifests.SSAOptions {
512- FieldManagerName : constants .KubernetesFieldManagerName ,
513- InventoryNamespace : constants .KubernetesInventoryNamespace ,
514- InventoryName : constants .KubernetesBootstrapManifestsInventoryName ,
515- SSApplyBehaviorOptions : manifests.SSApplyBehaviorOptions {
516- DryRun : options .DryRun ,
517- InventoryPolicy : options .InventoryPolicy ,
518- ReconcileTimeout : options .ReconcileTimeout ,
519- PruneTimeout : options .PruneTimeout ,
520- ForceConflicts : options .ForceConflicts ,
521- NoPrune : options .NoPrune ,
522- },
523- }
524-
525- options .Log ("comparing with live objects" )
526-
527- result , err := manifests .DiffSSA (ctx , objects , config , ssaOptions )
528- if err != nil {
529- return err
530- }
531-
532- if len (result ) == 0 {
533- options .Log ("< no changes detected" )
534- }
535-
536- for _ , r := range result {
537- objPath := fmt .Sprintf ("%s %s/%s" , r .Object .GroupVersionKind ().Kind , r .Object .GetNamespace (), r .Object .GetName ())
538- if r .Object .GetNamespace () == "" {
539- objPath = fmt .Sprintf ("%s %s" , r .Object .GroupVersionKind ().Kind , r .Object .GetName ())
540- }
541-
542- options .Log ("< %s %s" , r .Action , objPath )
543- options .Log ("%s" , r .Diff )
544- }
545-
546- options .Log ("applying manifests" )
547-
548- return manifests .SyncWithLogSSA (
511+ return manifests .SyncAndDiffWithLogSSA (
549512 ctx ,
550513 objects ,
551514 config ,
552- ssaOptions ,
515+ manifests.SSAOptions {
516+ FieldManagerName : constants .KubernetesFieldManagerName ,
517+ InventoryNamespace : constants .KubernetesInventoryNamespace ,
518+ InventoryName : constants .KubernetesBootstrapManifestsInventoryName ,
519+ SSApplyBehaviorOptions : manifests.SSApplyBehaviorOptions {
520+ DryRun : options .DryRun ,
521+ InventoryPolicy : options .InventoryPolicy ,
522+ ReconcileTimeout : options .ReconcileTimeout ,
523+ PruneTimeout : options .PruneTimeout ,
524+ ForceConflicts : options .ForceConflicts ,
525+ NoPrune : options .NoPrune ,
526+ },
527+ },
553528 options .Log ,
554529 )
555530}
0 commit comments