File tree 1 file changed +10
-10
lines changed
1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -311,19 +311,19 @@ func (l *Loader) apply(ctx context.Context, obj *unstructured.Unstructured) *uns
311
311
return nil
312
312
}
313
313
logger .Debug ("Updated" )
314
- } else {
315
- logger .Debug ("Created" )
316
- }
317
314
318
- if newObj != nil {
319
- status , ok , _ := unstructured .NestedFieldNoCopy (obj .Object , "status" )
320
- if ok && ! reflect .DeepEqual (newObj .Object ["status" ], status ) {
321
- newObj .Object ["status" ] = status
322
- newObj , err = ri .UpdateStatus (ctx , newObj , metav1.UpdateOptions {FieldValidation : "Ignore" })
323
- if err != nil {
324
- logger .Error ("Failed to update status" , err )
315
+ if newObj != nil {
316
+ status , ok , _ := unstructured .NestedFieldNoCopy (obj .Object , "status" )
317
+ if ok && ! reflect .DeepEqual (newObj .Object ["status" ], status ) {
318
+ newObj .Object ["status" ] = status
319
+ newObj , err = ri .UpdateStatus (ctx , newObj , metav1.UpdateOptions {FieldValidation : "Ignore" })
320
+ if err != nil {
321
+ logger .Error ("Failed to update resource status" , err )
322
+ }
325
323
}
326
324
}
325
+ } else {
326
+ logger .Debug ("Created" )
327
327
}
328
328
329
329
l .successCounter ++
You can’t perform that action at this time.
0 commit comments