@@ -104,6 +104,7 @@ type KustomizationReconciler struct {
104104 ConcurrentSSA int
105105 DisallowedFieldManagers []string
106106 StrictSubstitutions bool
107+ GroupChangeLog bool
107108}
108109
109110// KustomizationReconcilerOptions contains options for the KustomizationReconciler.
@@ -799,7 +800,11 @@ func (r *KustomizationReconciler) apply(ctx context.Context,
799800 if changeSet != nil && len (changeSet .Entries ) > 0 {
800801 resultSet .Append (changeSet .Entries )
801802
802- log .Info ("server-side apply for cluster definitions completed" , "output" , changeSet .ToMap ())
803+ if r .GroupChangeLog {
804+ log .Info ("server-side apply for cluster definitions completed" , "output" , changeSet .ToGroupedMap ())
805+ } else {
806+ log .Info ("server-side apply for cluster definitions completed" , "output" , changeSet .ToMap ())
807+ }
803808 for _ , change := range changeSet .Entries {
804809 if HasChanged (change .Action ) {
805810 changeSetLog .WriteString (change .String () + "\n " )
@@ -825,7 +830,11 @@ func (r *KustomizationReconciler) apply(ctx context.Context,
825830 if changeSet != nil && len (changeSet .Entries ) > 0 {
826831 resultSet .Append (changeSet .Entries )
827832
828- log .Info ("server-side apply for cluster class types completed" , "output" , changeSet .ToMap ())
833+ if r .GroupChangeLog {
834+ log .Info ("server-side apply for cluster definitions completed" , "output" , changeSet .ToGroupedMap ())
835+ } else {
836+ log .Info ("server-side apply for cluster class types completed" , "output" , changeSet .ToMap ())
837+ }
829838 for _ , change := range changeSet .Entries {
830839 if HasChanged (change .Action ) {
831840 changeSetLog .WriteString (change .String () + "\n " )
@@ -852,7 +861,11 @@ func (r *KustomizationReconciler) apply(ctx context.Context,
852861 if changeSet != nil && len (changeSet .Entries ) > 0 {
853862 resultSet .Append (changeSet .Entries )
854863
855- log .Info ("server-side apply completed" , "output" , changeSet .ToMap (), "revision" , revision )
864+ if r .GroupChangeLog {
865+ log .Info ("server-side apply for cluster definitions completed" , "output" , changeSet .ToGroupedMap ())
866+ } else {
867+ log .Info ("server-side apply completed" , "output" , changeSet .ToMap (), "revision" , revision )
868+ }
856869 for _ , change := range changeSet .Entries {
857870 if HasChanged (change .Action ) {
858871 changeSetLog .WriteString (change .String () + "\n " )
0 commit comments