1
votes

I had 3 perfectly working spring cloud dataflow task applications that would execute and complete but would not show any metric data in Prometheus/Graphana, I added the following Gradle dependencies to the build.gradle file...

  1. implementation 'org.springframework.boot:spring-boot-starter-actuator'
  2. runtimeOnly group: 'org.springframework.cloud', name: 'spring-cloud-dependencies', version: 'Hoxton.SR12', ext: 'pom'
  3. implementation group: 'io.micrometer.prometheus', name: 'prometheus-rsocket-spring', version: '1.3.0'

After this the tasks now show up in the Grafana Task dashboard but... the tasks never complete in kubernetes, they just stay running.

I've tried adding the spring.cloud.task.closecontextEnabled=true argument to the task launcher message but this does not seem to have any affect on the pods.

I've checked the logs of those task pods and nothing interesting.

Is there a way to manually in code call something to end the pod or is there another way to enable the metrics collection without affecting the task pod behavior?

Any help would be appreciated.

Thanks,

1

1 Answers

1
votes

Added the spring.cloud.task.closecontextEnabled=true to the application.yml file and now the pod is showing complete after it runs.

spring: 
  cloud:
    task:
      closecontextEnabled: true