Skip to main content
SUNK supports Slurm’s custom job submit script functionality to control cluster behavior and user job submissions. When a user submits a Slurm job to the SUNK cluster, the script evaluates the job’s attributes before accepting it into the job queue. The script can enforce resource limitations, redirect jobs to specific queues, and require specific fields for job submissions. You can customize the script to enforce rules based on specific job attributes, such as partition, GPU count, time limit, or user account.

Deploy a custom job submit script to SUNK

To make a custom Lua script available to Slurm, deploy the script to the cluster and configure Slurm to load it at startup:
  1. Deploy the script in a Kubernetes ConfigMap with the key job_submit.lua.
  2. Add the name of the ConfigMap in the Slurm values.yaml file at controller.etcConfigMap.
  3. Set the slurmConfig.JobSubmitPlugins: [lua] parameter to enable the use of Lua scripts in the Slurm cluster.
After these steps, Slurm evaluates incoming job submissions against your script before adding them to the job queue.
The Lua script must be named job_submit.lua and must reside in the default configuration directory. An invalid script crashes slurmctld.

Example script

The following script is an example from the Slurm source code that sets a partition for user jobs.
Last modified on May 27, 2026