Passing annotation to scheduled task in spring cloud dataflow

5/2/2019

I am running SCDF on Kubernetes and have scheduled some tasks. I have to pass annotations to my tasks. I have given the following annotations in env:

    - name: SPRING_CLOUD_DEPLOYER_KUBERNETES_POD_ANNOTATIONS
      value:
    - name: SPRING_CLOUD_DEPLOYER_KUBERNETES_JOB_ANNOTATIONS
      value:

These work when i manually trigger the task. I also want these annotations to be added to pods created by scheduled cron jobs. How can i do that?

I tried the following annotations:

    - name: SPRING_CLOUD_SCHEDULER_KUBERNETES_POD_ANNOTATIONS
      value:
    - name: SPRING_CLOUD_SCHEDULER_KUBERNETES_JOB_ANNOTATIONS
      value:
-- Siddhant Sorann
kubernetes-cronjob
spring
spring-cloud
spring-cloud-dataflow
spring-cloud-task

1 Answer

5/2/2019

The support for podAnnotations and jobAnnotations is not implemented yet in spring-cloud/spring-cloud-scheduler-kubernetes project. It'd be a port of exactly the same functionality that is already available in spring-cloud/spring-cloud-deployer-kubernetes project.

As discussed at spring-cloud/spring-cloud-dataflow-server-kubernetes/issues/428#issuecomment-488670392, it can be implemented and released when it is ready.

Contributions welcome!

-- Sabby Anandan
Source: StackOverflow