snakemake / snakemake-executor-plugin-kubernetes

A snakemake executor plugin for submission of jobs to Kubernetes
MIT License
2 stars 6 forks source link

Allow node selectors #23

Open johanneskoester opened 1 month ago

johanneskoester commented 1 month ago

https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/

Idea: specify them as resources, but ideally in a k8s-independent generic fashion and introduce that as a default resource in Snakemake.

cc @neuhausl

johanneskoester commented 1 month ago

Input required: please post realistic examples for nodeselectors here.

neuhausl commented 1 month ago
body.spec = kubernetes.client.V1PodSpec(
            containers=[container], node_selector=node_selector

I replaced node_selector=node_selector with node_selector = {"usedby": "neuhausl"} in the plugin the node needs a label with the key usedby and the value neuhausl for that to work anything can be a key=value pair e.g. usedby=user, disktype=ssd, etc.