Skip to content

Comments

add default queue name to mpi jobs#1175

Open
iamvigneshwars wants to merge 5 commits intomainfrom
default-queuename
Open

add default queue name to mpi jobs#1175
iamvigneshwars wants to merge 5 commits intomainfrom
default-queuename

Conversation

@iamvigneshwars
Copy link
Contributor

Adding default mutation policy only patches the mpijob resource, labels were not getting propogated to its pods. ( Kueue creates the pods before kyverno could patch it )

So this validates if the queue-label is manually added to the mpijob manifest

@iamvigneshwars iamvigneshwars self-assigned this Feb 20, 2026
@iamvigneshwars iamvigneshwars added the helm Pull request that updates Helm charts label Feb 20, 2026
operator: AnyNotIn
value:
- default-queue

Copy link
Collaborator

Choose a reason for hiding this comment

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

Just confirming that I understand correctly:

The problem is that it is possible for MPIJob to start pods without kyverno policies being applied.

This PR fixes the problem caused by the set-default-queuename rule not being applied. We force the label to be explicitly set in MPIJob and that gets propagated down to the pods that it creates.

That's OK since we expect MPIJob to only be used by "experts" so we don't mind if they need to add a little extra boiler plate.

What about other kyverno policies? Can they being skipped as well by MPIJob pods?

In particular, I'm concerned about any security related policies (eg pod-securitycontext, apply-posix-uid-label etc).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Other Kyverno pod policies still apply to MPIJob created pods (I've included mpijob pods in my previous PR's). The only issue was with the set-default-queuename rule is if the queue label was not applied, the pods could start but would bypass Kueue.
This fixes that by requiring the label to be explicitly set on the MPIJob so it propagates to the pods.
All other policies pod security context are still applied, and pods will not start if those policies fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

helm Pull request that updates Helm charts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants