UpdateErrorAndWarning updates a resource's error and warnings. Unlike UpdateMeta and UpdateSpec, it does not cancel or enqueue reconciliation for the resource.
(ctx context.Context, name *runtimev1.ResourceName, reconcileErr error, warnings []string)
| 669 | // UpdateErrorAndWarning updates a resource's error and warnings. |
| 670 | // Unlike UpdateMeta and UpdateSpec, it does not cancel or enqueue reconciliation for the resource. |
| 671 | func (c *Controller) UpdateErrorAndWarning(ctx context.Context, name *runtimev1.ResourceName, reconcileErr error, warnings []string) error { |
| 672 | if err := c.checkRunning(); err != nil { |
| 673 | return err |
| 674 | } |
| 675 | if ctx.Err() != nil { |
| 676 | return ctx.Err() |
| 677 | } |
| 678 | c.lock(ctx, false) |
| 679 | defer c.unlock(ctx, false) |
| 680 | |
| 681 | err := c.catalog.updateErrorAndWarning(name, reconcileErr, warnings) |
| 682 | if err != nil { |
| 683 | return err |
| 684 | } |
| 685 | |
| 686 | return nil |
| 687 | } |
| 688 | |
| 689 | // Delete soft-deletes a resource and enqueues it for reconciliation (with DeletedOn != nil). |
| 690 | // Once the deleting reconciliation has been completed, the resource will be hard deleted. |
no test coverage detected