Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core Feature] Customize PodSpec for Pod tasks #1050

Closed
katrogan opened this issue May 25, 2021 · 1 comment
Closed

[Core Feature] Customize PodSpec for Pod tasks #1050

katrogan opened this issue May 25, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request flytekit FlyteKit Python related issue plugins Plugins related labels (backend or frontend)
Milestone

Comments

@katrogan
Copy link
Contributor

katrogan commented May 25, 2021

Motivation: Why do you think this is important?
It should be possible to customize a pod spec for Pod Tasks further than just defining the pod spec. For example, users should be able to specify labels and annotations.

Goal: What should the final outcome look like, ideally?
Pod tasks expose an interface for modifying most components of a PodSpec

Describe alternatives you've considered

  • Using the custom field for task plugins, however this is currently reserved for the marshalled pod spec
  • Adding to the task config however this isn't well-suited for structured data (e.g. labels and annotations)

[Optional] Propose: Link/Inline OR Additional context
Add an alternative target: google.protobuf.Struct pod_spec = X; which represents a marshalled Pod [see below for definition] which will be used alongside the existing task definition to run the Pod flyte task.

@katrogan katrogan added enhancement New feature or request plugins Plugins related labels (backend or frontend) flytekit FlyteKit Python related issue labels May 25, 2021
@EngHabu
Copy link
Contributor

EngHabu commented May 25, 2021

I think the additional target should be something like:

message K8sPod {
   K8sObjectMetadata metadata = 1;
   google.protobuf.Struct pod_spec = 2;
}

message K8sObjectMetadata {
  map<string, string> labels = 1;
  map<string, string> annotations = 2;
}

// and in taskTemplate:

oneof target {        
  Container container = 6;    
  K8sPod k8s_pod = 7;
}

So we can control how much of K8s Pods do we want to expose to users to set?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request flytekit FlyteKit Python related issue plugins Plugins related labels (backend or frontend)
Projects
None yet
Development

No branches or pull requests

2 participants