Search code examples
spring-cloud-dataflow

SCDF Adds additional Cloud Foundry specific Props on a K8s install


We are using bitnami helm charts to install Spring cloud dataflow and skipper on a K8s cluster.

Things all work fine and we are able to get streams deployed.

But do notice that there are few properties which we did not set in helm values propping up.

The following properties

management.endpoints.web.exposure.include: health,info,bindings
management.metrics.tags.instance.index: ${vcap.application.instance_index:${spring.cloud.stream.instanceIndex:0}}
wavefront.application.service: ${spring.cloud.dataflow.stream.app.label:unknown}-${spring.cloud.dataflow.stream.app.type:unknown}-${vcap.application.instance_index:${spring.cloud.stream.instanceIndex:0}}
management.metrics.tags.application.name: ${vcap.application.application_name:${spring.cloud.dataflow.stream.app.label:unknown}}

I have left out a few others, but the above are the ones that are a concern.

We use config server for getting properties for the app that gets deployed by SCDF.

In there, we set web exposure to include env/configprops, but those are ignored and the environment property set by scdf overrides it.

One solution is to add this property into values yaml, but that would mean i am not able to use config server repo to control them.

And for other properties which uses vcap, i believe it is more a PCF convention, will that work on K8s, also i am not sure if K8s has an instance index.

My questions are. how to make sure config server properties take precedence over env properties set by SCDF on deployed apps. how to suppress PCF specific properties on my k8s install of SCDF?


Solution

  • Spring Boot properties can be specified to get values from other properties including defaults as in this sample: propA=${propB:${propC:0}}

    The vcap properties are only valid in CF environment and can be removed in the k8s defaults.

    Result:

    management.metrics.tags.instance.index: ${spring.cloud.stream.instanceIndex:0}
    wavefront.application.service: ${spring.cloud.dataflow.stream.app.label:unknown}-${spring.cloud.dataflow.stream.app.type:unknown}-${spring.cloud.stream.instanceIndex:0}
    

    At the moment SCDF adds default properties based on management.defaults in the dataflow and skipper app configurations. Unless you provide a new value during deployment it will be passed as arguments or environment variables both of which will override configuration from config server.

    I suggest you specify the defaults in dataflow and skipper and update them as needed.

    Please log an issue describing the problem.