Hi all, I noticed in the metaflow kubernetes plugi...
# ask-metaflow
b
Hi all, I noticed in the metaflow kubernetes plugin code here, the code is mostly doing a merge operation of user provided values and metaflow opinionated values. As a user, it's a bit annoying that not all the fields in the pod template spec are available to users in the kubernetes decorator. Are there specific technical issues around allowing users to pass through any fields in the pod template spec, particularly ones metaflow doesn't modify?
1
For a little more context on my immediate use case, I'd like to use the nvidia kai scheduler to more intelligently place pods based on gpu resource requirements. It requires setting the schedulerName field in the pod spec to work, but this currently isn't available in the metaflow k8s decorator
a
For those use cases, we run a policy agent internally. That makes it easy to evolve the values independent of user action or library updates
thankyou 1
b
Ah, thanks for the tip! I'll take a look at implementing this modification via a policy agent
a
In practice we have found it easier to manage infra related bits of the pod spec through these policies
b
Yea that makes sense. I was originally thinking I would create a custom decorator to hide all the special k8s values and so that way they would not leak into all our flow definitions, but I like the sound of this more since all the infra changes can be made together without modifying flow code/configuration at all
a
Yep - also you can have a custom decorator that basically applies @kubernetes with custom annotations. Your policy framework can then make decisions based on these annotations
That way you can still offer some control to end users
🙌 1