https://prefect.io logo
k

Kiley Roberson

08/15/2023, 4:21 PM
Hi all! Hoping to get some help with my kubernetes work pool infrastructure. I would like to be able to add a node selector/tolerations to my deployment to ensure that my worker pool and all the jobs that it spins up are on a specific node pool (As this is the only node pool with workload identity enabled and I need it for some flows). Hoping to get some help regarding how I might be able to do this! Thanks!
r

redsquare

08/15/2023, 4:30 PM
We specify these in our base job manifest in our kubernetes job block
like so
k

Kiley Roberson

08/15/2023, 4:35 PM
Thanks! We might have to swap to this setup then - from a previous convo with a prefect employee we had ended up going with the worker/work-pool rather than job block setup, so we dont actually have a base job manifest like this 😕
r

redsquare

08/15/2023, 4:48 PM
yeah I am not quite sure how they work, how do you currently deploy?
you should be able to patch in these specifications
k

Kiley Roberson

08/15/2023, 4:52 PM
Currently we deploy with a prefect.yaml that manages our flow deployments. But yeah I will look into seeing if there is a way to specify that info at this level, otherwise we might have to make some changes to our deployments 😅
r

redsquare

08/15/2023, 5:15 PM
yeah - sorry we are still on 'legacy' agents, not migrated as they work for us
n

Nate

08/15/2023, 7:55 PM
if you go to the Advanced page on a k8s work pool, you have complete control over the whole job template - you can hardcode values or template things in from blocks, variables etc
c

Christopher Boyd

08/16/2023, 2:39 PM
I’ve done it both ways (with blocks and with a work pool) - it’s as both @redsquare and @Nate mentioned - the worker work pool is just a full k8s job template, and you could customize it as you need. If you have specific deployments that maybe require specific tolerations, that you don’t want to apply to every flow run, you can do that as a job override in the prefect.yaml for just that deployment
upvote 1