Skip to content

Add runtimeClassName to the pod options#6633

Merged
bentsherman merged 5 commits intonextflow-io:masterfrom
alexpilotti:runtimeClassName
Dec 5, 2025
Merged

Add runtimeClassName to the pod options#6633
bentsherman merged 5 commits intonextflow-io:masterfrom
alexpilotti:runtimeClassName

Conversation

@alexpilotti
Copy link
Contributor

@alexpilotti alexpilotti commented Dec 3, 2025

Close #6632

This PR adds runtimeClassName to the K8s pod options in order to support scenarios where the desired container runtime configuration is not the default one as it often happens when using NVIDIA GPUs, although it can apply to other scenarios as well (e.g., kata containers).

This PR includes also the corresponding updates in the documentation.

An initial commit is also included to remove unnecessary trailing whitespaces from the files affected by this PR to avoid unrelated changes in the subsequent commits, especially when using editors configured to automatically remove such whitespaces, as it is common practice.

Here's a typical configuration file usage example:

process {
    executor = 'k8s'

    accelerator {
        limit = 2
        type = "nvidia.com/gpu"
    }

    pod = [ runtimeClassName: 'nvidia' ]
}

@alexpilotti alexpilotti requested a review from a team as a code owner December 3, 2025 18:53
@netlify
Copy link

netlify bot commented Dec 3, 2025

Deploy Preview for nextflow-docs-staging ready!

Name Link
🔨 Latest commit 3767963
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/693311f3b14e580008c6f5d8
😎 Deploy Preview https://deploy-preview-6633--nextflow-docs-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Signed-off-by: Alessandro Pilotti <apilotti@cloudbasesolutions.com>
@alexpilotti alexpilotti force-pushed the runtimeClassName branch 3 times, most recently from 6962959 to 535dc4c Compare December 3, 2025 20:44
Copy link
Member

@bentsherman bentsherman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing! Just a few details to resolve

@alexpilotti alexpilotti force-pushed the runtimeClassName branch 2 times, most recently from 6758042 to ec02890 Compare December 4, 2025 19:37
Signed-off-by: Alessandro Pilotti <apilotti@cloudbasesolutions.com>
Signed-off-by: Alessandro Pilotti <apilotti@cloudbasesolutions.com>
@bentsherman
Copy link
Member

@alexpilotti does the PR still work on your end after the changes from the review?

@alexpilotti
Copy link
Contributor Author

@alexpilotti does the PR still work on your end after the changes from the review?

Yes, just checked again with a fresh build, all good. Tests work as well.

@alexpilotti
Copy link
Contributor Author

alexpilotti commented Dec 5, 2025

@alexpilotti does the PR still work on your end after the changes from the review?

Yes, just checked again with a fresh build, all good. Tests work as well.

For reference, here's a .command.yaml from the last run, including the runtimeClassName spec setting:

apiVersion: v1
kind: Pod
metadata:
  name: nf-255469281f5726df29a2fa28462202f2-a1608
  namespace: nf-core
  labels: {nextflow.io/processName: NFCORE_CUDATEST_CUDATEST_NVIDIASMI, nextflow.io/runName: pensive_carlsson,
    nextflow.io/sessionId: uuid-5b9c1e91-9a08-4b7f-8efc-839ea2c1e377, nextflow.io/app: nextflow,
    nextflow.io/taskName: NFCORE_CUDATEST_CUDATEST_NVIDIASMI}
spec:
  restartPolicy: Never
  containers:
  - name: nf-255469281f5726df29a2fa28462202f2-a1608
    image: registry.nf-core:5000/nf-core-cuda
    args:
    - /bin/bash
    - -ue
    - -c
    - !!org.codehaus.groovy.runtime.GStringImpl {}
    resources:
      requests: {cpu: 4, memory: 16384Mi, nvidia.com/gpu: 2}
      limits: {memory: 16384Mi, nvidia.com/gpu: 2}
    volumeMounts:
    - {name: vol-1, mountPath: /workspace}
  activeDeadlineSeconds: 14400
  runtimeClassName: nvidia
  volumes:
  - name: vol-1
    persistentVolumeClaim: {claimName: nf-core-data-pvc}

@bentsherman bentsherman merged commit ddcef4f into nextflow-io:master Dec 5, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add runtimeClassName support for pod specs in the K8s plugin

2 participants