Skip to content

Feature Request: Allow setting priorityClassName for TestRun pods #646

@vsoloviov

Description

@vsoloviov

Feature Description

Summary
Add support for configuring priorityClassName in the TestRun specification to allow pods to be scheduled with a specific Kubernetes PriorityClass.

Motivation
In environments with limited resources or where scheduling pressure is common, pods may be evicted due to low priority. Since the k6 operator/controller does not currently restart evicted pods, test reliability can suffer.
By allowing users to assign a priorityClassName to TestRun pods, we can reduce the likelihood of eviction and improve test stability in production-like or resource-constrained environments.

Suggested Solution (optional)

Extend the TestRun CRD to optionally accept a priorityClassName field that will be applied to the resulting test pod(s). For example:

apiVersion: k6.io/v1alpha1
kind: TestRun
metadata:
  name: sample-test
spec:
  script:
    configMap:
      name: test-script
      file: test.js
  runner:
    priorityClassName: high-priority

This would propagate the priorityClassName value into the pod spec generated by the operator.

Already existing or connected issues / PRs (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions