spring-cloud-app-broker icon indicating copy to clipboard operation
spring-cloud-app-broker copied to clipboard

Add SPeL support to services configuration

Open mheath opened this issue 6 years ago • 1 comments

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.)

mheath avatar May 14 '19 16:05 mheath

eliminate the need for parameters transformers

That's a significant breaking change.

royclarkson avatar Jan 28 '20 20:01 royclarkson