Skip to content

Commit

Permalink
Update SwiftRing status if PVCs not ready
Browse files Browse the repository at this point in the history
The function DeviceList returns an error if the requested PVCs are not
found or bound yet. This patch updates the conditions to reflect the current state.
  • Loading branch information
cschwede committed Mar 4, 2024
1 parent 004c6f5 commit b257699
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions controllers/swiftring_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,12 @@ func (r *SwiftRingReconciler) reconcileNormal(ctx context.Context, instance *swi

deviceList, deviceListHash, err := swiftring.DeviceList(ctx, helper, instance)
if err != nil {
instance.Status.Conditions.Set(condition.FalseCondition(
swiftv1beta1.SwiftRingReadyCondition,
condition.ErrorReason,
condition.SeverityWarning,
swiftv1beta1.SwiftRingReadyErrorMessage,
err.Error()))
return ctrl.Result{}, err
}

Expand Down

0 comments on commit b257699

Please sign in to comment.