spring-cloud-app-broker
spring-cloud-app-broker copied to clipboard
Add SPeL support to services configuration
Being able to do something like:
...
services:
- service-name: example
plan-name: example-plan
apps:
- name: example-app1
properties:
memory: (( parameters.app1-memory ?: "1G" ))
environment:
some.property: (( parameters.value ?: properties['property.from.spring.environment'] ?: "defaultValue" ))
another.property: (( @springBean.someMethod(parameters.value) ))
Where (( ... )) denotes a SpEL expression with an evaluator that is scoped to the service broker request (provision, update, delete...). We couldn't use the default SpEL evaluator from Boot since it is scoped to the application, rather than service broker request.
This would make setting properties and environment values much more flexible. This would also eliminate the need for parameters transformers.
This is currently being used in SCDF for PCF with fantastic success (but could be significantly improved.)
eliminate the need for parameters transformers
That's a significant breaking change.