Skip to content

Add support for Downward API volumes (fieldRef in volume mounts) #443

@dciangot

Description

@dciangot

Feature Request: Downward API Volume Support

Currently, InterLink supports Downward API environment variables via fieldRef, but does not support Downward API volumes that expose pod metadata as files.

Current Support

✅ Environment variables via fieldRef:

env:
  - name: POD_NAME
    valueFrom:
      fieldRef:
        fieldPath: metadata.name

Missing Support

❌ Downward API volumes:

volumes:
  - name: podinfo
    downwardAPI:
      items:
        - path: "pod-name"
          fieldRef:
            fieldPath: metadata.name
        - path: "labels"
          fieldRef:
            fieldPath: metadata.labels
        - path: "annotations"
          fieldRef:
            fieldPath: metadata.annotations

Use Case

Downward API volumes are useful when:

  • Applications need to read metadata from files rather than environment variables
  • Multiple pieces of metadata need to be accessible in a structured way
  • Labels and annotations need to be exposed (not supported in env fieldRef)
  • Applications expect metadata in specific file locations

Expected Behavior

When a pod uses Downward API volumes, the virtual kubelet should:

  1. Create the specified volume mount path in the container
  2. Populate files with the requested pod metadata
  3. Support all standard Downward API fieldRef paths in volumes:
    • metadata.name
    • metadata.namespace
    • metadata.uid
    • metadata.labels (volume-only feature)
    • metadata.annotations (volume-only feature)
    • spec.nodeName
    • spec.serviceAccountName
    • status.podIP
    • status.hostIP

Testing

Related test case development in: interlink-hq/vk-test-set#11

This would enable full Kubernetes Downward API compatibility in InterLink implementations.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions