1

I'm trying to set an application property to a spring value in a helm values file. But when I deploy this helm chart to kubernetes, I can see the value is not replaced. I would like to set the application value to the name of the stream or task. This is what I'm trying to do at the moment:

In the values.yaml file for helm:

spring.cloud.dataflow:
 server:
  extraEnvVars:
    - name: spring.cloud.dataflow.applicationProperties.stream.appName
      value: ${spring.cloud.dataflow.stream.name}
    - name: spring.cloud.dataflow.applicationProperties.task.appName
      value: ${spring.cloud.task.name}

But when I look at the output of describe pod I get this:

Containers:
  name:
    Args:
      --appName=${spring.cloud.dataflow.stream.name}

My question is, if this approach is even possible? I would like to have one property which works for both tasks and streams. Else I need to define different configs in Java and conditions to decide which config to load.

David Maze
  • 130,717
  • 29
  • 175
  • 215
Vin
  • 11
  • 1
  • 1
    can you also, please post your template for your deployment resource? – Josh Beauregard Nov 11 '21 at 17:40
  • I think we should note that unless you are using gotmpl for you rvalues files, `${}` objects in your values file are not computed. I would investigate setting these values using `_helpers.tpl` files for computing based on your values file. Without additional manifests it's hard to tell. https://helm.sh/docs/chart_template_guide/named_templates/ – Derek Williams Nov 15 '21 at 18:00

1 Answers1

0

The Helm properties that apply to a deployed application can be found in the deployer section for dataflow server.extraEnvVars and skipper skipper.extraEnvVars

https://github.com/bitnami/charts/tree/main/bitnami/spring-cloud-dataflow/#installing-the-chart