openshift / ansible-service-broker

Ansible Service Broker
Apache License 2.0
226 stars 84 forks source link

Add the service class id as a parameter that is passed through to the apb #481

Closed maleck13 closed 7 years ago

maleck13 commented 7 years ago

Feature:

It could be useful for the APB to know which service class the provision request came from, largely for metadata. I know I would like to be able to annotate / label objects I am creating with the service class id that triggered their creation. I believe this is relatively simple to do as the service class id is part of the provision request to the service broker.

If this is something that you guys are happy with having as part of the asb, I am happy to take on this issue.

jwmatthews commented 7 years ago

@maleck13 sounds like a good feature to add in.

In addition to the serviceclass id, it'd also be interesting to note if we could determine and pass in the service instance id to the APB.

Are you interested in contributing a PR for this?

jwmatthews commented 7 years ago

@maleck13 issue #470 may be related to this

maleck13 commented 7 years ago

@jwmatthews absolutely will take a look at these

eriknelson commented 7 years ago

Agreed, sounds like a good feature, and shouldn't be too difficult to implement.

There is precedence for broker injected parameters; they're prepended with a sort of "namespace" i.e. _apb_<parameter>. If we're adding more injected params, I would add another namespaced parameter field for them and inject in a similar way.

See https://github.com/openshift/ansible-service-broker/blob/master/pkg/broker/types.go#L35 and the early broker.go#provision.go method for injection.

maleck13 commented 7 years ago

Hey guys to just keep you informed I am hoping to work on this issue early next week

jwmatthews commented 7 years ago

@maleck13 sounds great.

jmrodri commented 7 years ago

This has been merged.