cloudfoundry / stratos

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

service meta-data (labels and annotations) support: display and filter-by #4089

Open gberche-orange opened 4 years ago

gberche-orange commented 4 years ago

Expected behaviour

As a stratos CF user, in order to display CF metadata (labels and annotations attached to a service instance, I need the services and space service view to display labels and annotations if any.

As a stratos CF user, in order to search/filter services by labels, I need the services view to offer to filter by annotation name, value and operator (see the rich selector syntax with [in]existence, [in]equality, inclusion, exclusion).

Actual behaviour

Annotations and metadata are not yet displayed in the services view image

Annotations and metadata are not yet displayed in the space services view image

As a workaround, users need to use the CF CLI curl command, although the /v3/service_instances/GUID is not yet available as of Jan 2020, see https://github.com/orange-cloudfoundry/osb-cmdb-spike/issues/10#issuecomment-567967267 for more detailed analysis

Context

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

This would be used to use stratos for osb-cmdb with meta-data attached to service instances, as a UI view complementing CF CLI usage (see also current CF CLI workaround)

How can it benefit other users?

Users want to attach metadata to service instances, such as email address to alert on when service instance fails, or billing/recharging code.

Possible Implementation

For listing and filtering by meta-data, by using the currently available /v3/service_instances?label_selector= CF V3 API endpoint , see meta-data doc

gberche-orange commented 4 years ago

@richard-cox Sorry for my confusion during our call today. The metadata feature is indeed supported through additional V3 endpoints which can be called in addition to existing V2 endpoints. In other words, some metadata related features could potentially be introduced prior to migrating all V2 endpoints to V3.

For example, here are possible CF API endpoints call supporting different service instances use-cases: