Skip to content

Commit

Permalink
include async operation description in status (#372)
Browse files Browse the repository at this point in the history
  • Loading branch information
kerenlahav authored Nov 30, 2023
1 parent eec6660 commit 92f74ae
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM --platform=$BUILDPLATFORM golang:1.21rc3-alpine3.18 as builder
FROM --platform=$BUILDPLATFORM golang:1.21.4-alpine as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
8 changes: 8 additions & 0 deletions controllers/serviceinstance_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,14 @@ func (r *ServiceInstanceReconciler) poll(ctx context.Context, serviceInstance *s
case smClientTypes.INPROGRESS:
fallthrough
case smClientTypes.PENDING:
if len(status.Description) > 0 {
log.Info("last operation description is '%s'", status.Description)
setInProgressConditions(ctx, status.Type, status.Description, serviceInstance)
if err := r.updateStatus(ctx, serviceInstance); err != nil {
log.Error(err, "unable to update ServiceInstance polling description")
return ctrl.Result{}, err
}
}
return ctrl.Result{Requeue: true, RequeueAfter: r.Config.PollInterval}, nil
case smClientTypes.FAILED:
errMsg := getErrorMsgFromLastOperation(status)
Expand Down

0 comments on commit 92f74ae

Please sign in to comment.