Skip to content

Add support for K8sPod app payload in app_client.go #7328

@pingsutw

Description

@pingsutw

Summary

In app/internal/k8s/app_client.go, the Spec_Pod case is currently a stub that returns an error:

case *flyteapp.Spec_Pod:
    // K8sPod payloads are not yet supported — the pod spec serialization
    // from flyteplugins is needed for a complete implementation.
    return corev1.PodSpec{}, fmt.Errorf("K8sPod app payload is not yet supported")

What needs to be done

Implement the Spec_Pod case so that a K8sPod app payload is fully deserialized into a corev1.PodSpec. This requires:

  1. Leveraging the pod spec serialization from flyteplugins (or an equivalent utility) to convert the flyteapp.Spec_Pod proto payload into a corev1.PodSpec.
  2. Handling any container overrides, resource requirements, environment variables, and port mappings that may be present in the pod spec.
  3. Adding unit tests covering the new code path.

Why this matters

Without this support, workflows that define tasks as K8sPod payloads cannot be scheduled via the app client, limiting the expressiveness available to Flyte v2 users.

Related

  • app/internal/k8s/app_client.gobuildPodSpec function, Spec_Pod case

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions