You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It appears that when using the Kubernetes executor, the resource specification of machine_type is not respected. This is not nice when you want rules to use certain compute instances.
For example, in GKE I have node-pool-A with high-cpu machines for BWA-mem, and node-pool-B with smaller machines for GATK HaplotypeCaller. Because the BWA-mem rule requests more CPUs than the node-pool-B can provide, Kubernetes scales up node-pool-A and puts the pod there. However, when running the GATK rule, which requests only one CPU, Kubernetes can place the pod in either node-pool, which leads to an inefficient allocation of resources.
Describe the solution you'd like
Snakemake respect the machine_type resource specification.
Describe alternatives you've considered
It seems that the Kubernetes Python API does not have a direct way to specify a machine type when creating a pod (that I could find). However, using a nodeSelector, one could apply a node label to a node pool, and that node label could be used when creating a pod so that it will end up on the corresponding node.
Additional context
Add any other context or screenshots about the feature request here.
I would also be interested in support for defining nodeSelectors.
For example, my k8s cluster is a mixed ARM64 and AMD64 cluster with autoscaling. I need snakemake to be able to tell kubernetes to require beta.kubernetes.io/arch: amd64
I would also be interested in support for defining nodeSelectors.
For example, my k8s cluster is a mixed ARM64 and AMD64 cluster with autoscaling. I need snakemake to be able to tell kubernetes to require beta.kubernetes.io/arch: amd64
#1291 Adds support for machine_type using the "node.kubernetes.io/instance-type" selector. I think it should be simple to add support for a resource node_selector to allow user specifed nodeSelectors.
Is your feature request related to a problem? Please describe.
It appears that when using the Kubernetes executor, the resource specification of
machine_type
is not respected. This is not nice when you want rules to use certain compute instances.For example, in GKE I have node-pool-A with high-cpu machines for BWA-mem, and node-pool-B with smaller machines for GATK HaplotypeCaller. Because the BWA-mem rule requests more CPUs than the node-pool-B can provide, Kubernetes scales up node-pool-A and puts the pod there. However, when running the GATK rule, which requests only one CPU, Kubernetes can place the pod in either node-pool, which leads to an inefficient allocation of resources.
Describe the solution you'd like
Snakemake respect the
machine_type
resource specification.Describe alternatives you've considered
It seems that the Kubernetes Python API does not have a direct way to specify a machine type when creating a pod (that I could find). However, using a nodeSelector, one could apply a node label to a node pool, and that node label could be used when creating a pod so that it will end up on the corresponding node.
Additional context
Add any other context or screenshots about the feature request here.
The solution I propose is to add a check for a resource called
node_label
somewhere here, and if it exists pass it to the V1PodSpec call.I'm going to try and implement this solution this weekend, but would appreciate any feedback.
The text was updated successfully, but these errors were encountered: