How to expose pod information as environment variables to containers of Spring Cloud Dataflow Tasks

10/13/2021

I want to expose pod Information as environment variables to containers of Spring Cloud Dataflow Tasks.

With Kubernetes, this can be done via Pod fields (https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/):

containers:
  env:
    - name: NODE_NAME
      valueFrom:
        fieldRef:
          fieldPath: spec.nodeName
    - name: POD_NAME
      valueFrom:
        fieldRef:
          fieldPath: metadata.name
    - name: HOST_IP
      valueFrom:
        fieldRef:
          fieldPath: status.hostIP

For Spring Cloud Dataflow Tasks, how could i accomplish the same?

-- user3285922
kubernetes
spring-cloud-dataflow

0 Answers