vshn/crossplane-service-broker

Implement Async Bindings

srueg opened this issue · 0 comments

srueg commented

Summary

As a service broker user
I want bindings to report an accurate status
So that I can rely on this status to know if a binding is ready and usable

Context

Currently bindings are always done synchronously. Using the accepts_incomplete query parameter a client can allow async bindings. Especially if it takes several minutes for the binding to become ready (e.g. user/grant provisioned) it's helpful to reflect the current state of a binding: https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#polling-last-operation-for-service-bindings

https://github.com/openservicebrokerapi/servicebroker/blob/master/spec.md#request-creating-a-service-binding

It's important to still support sync bindings as well since not all clients support async bindings yet.

Out of Scope

  • List aspects that are explicitly not part of this feature

Further links

Acceptance criteria

Given a client specifies accepts_incomplete=true
When a binding is created
Then it's being done in an asynchronous manner and the status is reported

Implementation Ideas

  • Same as the implementation of async instance provisioning
    • Create the Composite instance
    • Poll the composite's status via /last_operation
    • Return credentials once the composite is ready