Skip to content

Environment Variables

For the numa container of vertex pods, environment variable NUMAFLOW_DEBUG can be set to true for debugging.

In udf, udsink and transformer containers, there are some preset environment variables that can be used directly.

  • NUMAFLOW_NAMESPACE - Namespace.
  • NUMAFLOW_POD - Pod name.
  • NUMAFLOW_REPLICA - Replica index.
  • NUMAFLOW_PIPELINE_NAME - Name of the pipeline.
  • NUMAFLOW_VERTEX_NAME - Name of the vertex.
  • NUMAFLOW_CPU_REQUEST - resources.requests.cpu, roundup to N cores, 0 if missing.
  • NUMAFLOW_CPU_LIMIT - resources.limits.cpu, roundup to N cores, use host cpu cores if missing.
  • NUMAFLOW_MEMORY_REQUEST - resources.requests.memory in bytes, 0 if missing.
  • NUMAFLOW_MEMORY_LIMIT - resources.limits.memory in bytes, use host memory if missing.

For setting environment variables on pods not owned by a vertex, see Pipeline Customization.

Your Own Environment Variables

To add your own environment variables to udf or udsink containers, check the example below.

apiVersion: numaflow.numaproj.io/v1alpha1
kind: Pipeline
metadata:
  name: my-pipeline
spec:
  vertices:
    - name: my-udf
      udf:
        container:
          image: my-function:latest
          env:
            - name: env01
              value: value01
            - name: env02
              valueFrom:
                secretKeyRef:
                  name: my-secret
                  key: my-key
    - name: my-sink
      sink:
        udsink:
          container:
            image: my-sink:latest
            env:
              - name: env03
                value: value03

Similarly, envFrom also can be specified in udf or udsink containers.

apiVersion: numaflow.numaproj.io/v1alpha1
kind: Pipeline
metadata:
  name: my-pipeline
spec:
  vertices:
    - name: my-udf
      udf:
        container:
          image: my-function:latest
          envFrom:
            - configMapRef:
                name: my-config
    - name: my-sink
      sink:
        udsink:
          container:
            image: my-sink:latest
            envFrom:
              - secretRef:
                  name: my-secret