@@ -945,6 +945,15 @@ func (w *SyncWorker) apply(ctx context.Context, work *SyncWork, maxWorkers int,
945
945
946
946
var reportEffectErrors []error
947
947
948
+ manifestVerbosity := klog .Level (4 )
949
+ switch {
950
+ case work .Attempt > 0 :
951
+ manifestVerbosity = 2
952
+ case work .State == payload .UpdatingPayload ||
953
+ work .State == payload .InitializingPayload :
954
+ manifestVerbosity = 2
955
+ }
956
+
948
957
// update each object
949
958
errs := payload .RunGraph (ctx , graph , maxWorkers , func (ctx context.Context , tasks []* payload.Task ) error {
950
959
// attempt to precreate a set of known types (currently ClusterOperator) without retries
@@ -956,14 +965,14 @@ func (w *SyncWorker) apply(ctx context.Context, work *SyncWork, maxWorkers int,
956
965
continue
957
966
}
958
967
if err := task .Manifest .Include (nil , nil , nil , & capabilities , work .Overrides ); err != nil {
959
- klog .V (2 ).Infof ("Skipping precreation of %s: %s" , task , err )
968
+ klog .V (manifestVerbosity ).Infof ("Skipping precreation of %s: %s" , task , err )
960
969
continue
961
970
}
962
971
if err := w .builder .Apply (ctx , task .Manifest , payload .PrecreatingPayload ); err != nil {
963
972
klog .V (2 ).Infof ("Unable to precreate resource %s: %v" , task , err )
964
973
continue
965
974
}
966
- klog .V (2 ).Infof ("Precreated resource %s" , task )
975
+ klog .V (manifestVerbosity ).Infof ("Precreated resource %s" , task )
967
976
}
968
977
969
978
for _ , task := range tasks {
@@ -972,10 +981,10 @@ func (w *SyncWorker) apply(ctx context.Context, work *SyncWork, maxWorkers int,
972
981
}
973
982
cr .Update ()
974
983
975
- klog .V (2 ).Infof ("Running sync for %s" , task )
984
+ klog .V (manifestVerbosity ).Infof ("Running sync for %s" , task )
976
985
977
986
if err := task .Manifest .Include (nil , nil , nil , & capabilities , work .Overrides ); err != nil {
978
- klog .V (2 ).Infof ("Skipping %s: %s" , task , err )
987
+ klog .V (manifestVerbosity ).Infof ("Skipping %s: %s" , task , err )
979
988
continue
980
989
}
981
990
if err := task .Run (ctx , payloadUpdate .Release .Version , w .builder , work .State ); err != nil {
@@ -987,7 +996,7 @@ func (w *SyncWorker) apply(ctx context.Context, work *SyncWork, maxWorkers int,
987
996
}
988
997
}
989
998
cr .Inc ()
990
- klog .V (2 ).Infof ("Done syncing for %s" , task )
999
+ klog .V (manifestVerbosity ).Infof ("Done syncing for %s" , task )
991
1000
}
992
1001
return nil
993
1002
})
0 commit comments