<https://github.com/flyteorg/flytekit/pull/3243> c...
# contribute
c
https://github.com/flyteorg/flytekit/pull/3243 could a flytekit code owner please give a review? 🙏 thank you
f
looking
c
It can be said about pod_template, by the name
pod_template
and this does go into the
k8spod
attribute.
Ok lets keep Labels and annotations, but lets not call is K8sObjectMetadata. Lets keep it as labels and annotations in TaskMetadata and the plugin is responsible to put it into k8s.
Moreover, lets document it saying, labels and annotations are optional parameters, that may not be applied in all cases. (<https://github.com/flyteorg/flytekit/pull/3243#issuecomment-2954292408
|source>)
@freezing-airport-6809 do I understand you correctly that you would like to have
Copy code
message TaskMetadata {
    ...


    // Metadata applied to task pods or task CR objects.
    // In flytekit, labels and annotations resulting in this metadata field
    // are provided via `@task(labels=..., annotations=...)`.
    // For tasks backed by pods like PythonFunctionTask, these take precedence
    // over the metadata provided via `@task(pod_template=PodTemplate(labels=...))` which are transported
    // in the K8sPod message. For tasks backed by CRDs, this metadata is applied to
    // the CR object itself while the metadata in the pod template/K8sPod is applied
    // to the pod template spec of the CR object.
    K8sObjectMetadata metadata = 16;
}
changed to
Copy code
message TaskMetadata {
    ...

    labels = ...
    annotations = ...
}
here?
Happy to change, would just like to align beforehand 🙂
f
Let me tal look today and respond
c
Hey @freezing-airport-6809 sorry to be pushy here, I’m sure you have a ton to do 🙈 Did you get a chance to take a look at how you would prefer for this to be implemented?
f
Ohh you are not pushy this is my bad
But if you do this this will change the idl too
I think labels and annotations can be more general
For example other plugins often support labels
Remind me why do you need both
@cool-lifeguard-49380
c
But if you do this this will change the idl too
I don’t think anything makes use of the metadata in idl yet because I introduced it only recently. On the flytekit side there is no support for it yet, PR is in review.
Remind me why do you need both
I only need annotations. Felt more complete to also handle labels. For instance because pyflyte has both as cli args.
f
Yes let’s go. Please let’s not add too many things in there
Problem is you can now add to a workflow and then over
c
Yes let’s go. Please let’s not add too many things in there
👍
Thank you