Documentation ¶
Overview ¶
Reporting focuses on reporting Events, Status Conditions, and the like to users.
Index ¶
- func ReportDeletionBlockedDueToDependents(ctx context.Context, logger *capnslog.PackageLogger, client client.Client, ...) error
- func ReportDeletionNotBlockedDueToDependents(ctx context.Context, logger *capnslog.PackageLogger, client client.Client, ...)
- func ReportReconcileResult(logger *capnslog.PackageLogger, recorder record.EventRecorder, ...) (reconcile.Result, error)
- func UpdateStatus(client client.Client, obj client.Object) error
- func UpdateStatusCondition(client client.Client, obj statusConditionGetter, newCond cephv1.Condition) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReportDeletionBlockedDueToDependents ¶
func ReportDeletionBlockedDueToDependents( ctx context.Context, logger *capnslog.PackageLogger, client client.Client, obj statusConditionGetter, deps *dependents.DependentList, ) error
ReportDeletionBlockedDueToDependents reports that deletion of a Rook-Ceph object is blocked due to the given dependents in 3 ways: 1. to the given logger 2. as a condition on the object (added to the object's conditions list given) 3. as the returned error which should be included in the FailedReconcile message
func ReportDeletionNotBlockedDueToDependents ¶
func ReportDeletionNotBlockedDueToDependents( ctx context.Context, logger *capnslog.PackageLogger, client client.Client, recorder record.EventRecorder, obj statusConditionGetter, )
ReportDeletionNotBlockedDueToDependents reports that deletion of a Rook-Ceph object is proceeding and NOT blocked due to dependents in 3 ways: 1. to the given logger 2. as an event on the object (via the given event recorder) 3. as a condition on the object (added to the object's conditions list given)
func ReportReconcileResult ¶
func ReportReconcileResult( logger *capnslog.PackageLogger, recorder record.EventRecorder, reconcileRequest reconcile.Request, obj client.Object, reconcileResponse reconcile.Result, err error, ) (reconcile.Result, error)
ReportReconcileResult will report the result of an object's reconcile in 2 ways: 1. to the given logger 2. as an event on the object (via the given event recorder)
The results of the object's reconcile should include the object (NEVER NIL), the reconcile response, and the error returned by the reconcile.
The reconcile request is used to reference a given object that doesn't have a name.
The function is designed to return the appropriate values needed for the controller-runtime framework's Reconcile() method.
func UpdateStatus ¶
UpdateStatus updates an object with a given status. The object is updated with the latest version from the server on a successful update.
func UpdateStatusCondition ¶
func UpdateStatusCondition( client client.Client, obj statusConditionGetter, newCond cephv1.Condition, ) error
UpdateStatusCondition updates (or adds to) the status condition to the given object. The object is updated with the latest version from the server on a successful update.
Types ¶
This section is empty.