cloudfoundry / stratos

Stratos: Web-based Management UI for Cloud Foundry and Kubernetes
Apache License 2.0
244 stars 131 forks source link

Support Multi-Service Broker Registration #4019

Open gberche-orange opened 4 years ago

gberche-orange commented 4 years ago

Detailed Description

CC API version 2.125.0 or greater allows multiple service brokers to offer services with the same name and or to have the same catalogs. More background in user facing impact in CLI at https://github.com/cloudfoundry/cli/releases/tag/v6.43.0 and updated documentation at https://docs.cloudfoundry.org/services/managing-service-brokers.html#multiple-brokers and https://docs.cloudfoundry.org/devguide/services/managing-services.html#create

As a Cf developer, in order to make use of services that are exposed by multiple brokers, I need the marketplace view to display the service broker name, and filter by service broker

Currently, service offerings offered by multiple service brokers can not be distinguished nor filtered in the marketplace, see screenshot

Corresponding CF CLI output displays the service broker as a new column

$ cf marketplace
Getting services from marketplace in org service-sandbox / space osb-cmdb-broker-0-smoke-tests as xx...
OK
service        plans          description          broker
p-mysql-cmdb   10mb, 20mb     A useful service     osb-cmdb-broker
p-mysql-cmdb   10mb, 20mb     A useful service     osb-cmdb-broker-0

Also service instances view, does not display the associated service broker name to distinguish among service offerings, see screenshot

Corresponding CF CLI output displays the service broker as a new column

cf s
Getting services in org service-sandbox / space osb-cmdb-broker-0-smoke-tests as xx...

name           service        plan   bound apps   last operation     broker              upgrade available
mysql-cmdb-0   p-mysql-cmdb   10mb                update succeeded   osb-cmdb-broker-0   
mysql-cmdb     p-mysql-cmdb   10mb                update succeeded   osb-cmdb-broker     

Context

Why is this change important to you? How would you use it?

How can it benefit other users?

richard-cox commented 4 years ago

This should be super simple in v2, the broker can be fetched inline via service.service_broker_guid. In v3 however we'll need to do this async with individual requests.

[Update]: I had a quick look at this today, and whilst the service can get the broker inline, it goes too deep to fetch inline with service instance (max depth of 2, and it goes service instance-->service plan-->service-->service broker). We'll have to fetch this separately and should take care that only one request per broker is made

gberche-orange commented 4 years ago

thanks @richard-cox for the analysis. I tried to pass along your feedback into V3 design doc at https://docs.google.com/document/d/1P5laZqVYjtl_boSdpksT5LHOFjhm6CQLzWVx24UpXpM/edit#