nomad icon indicating copy to clipboard operation
nomad copied to clipboard

Conditional JobSpec Variables for Task Based on Node Architecture

Open valafon opened this issue 7 months ago • 3 comments

We have the following problem - we need to deploy a job in an environment where nodes can be either amd64 or arm64. This isn't an issue when the jobspec doesn't vary by architecture, and the used image is multi-platform. However, as soon as the spec for the task level differs depending on which node Nomad places it on, problems arise.

Specifically, for example, I need to use the NVIDIA runtime on amd64 and runc on arm64. Additionally, I need to mount certain devices on amd64 and different ones on arm64. From what I have read in the documentation, this can be managed at the template level for setting different variables, but parameters like runtime, devices, and other such settings cannot be placed in if blocks depending on the architecture.

Does Nomad have any hidden undocumented features or any workarounds for this?

valafon avatar Jul 05 '24 03:07 valafon