We have a handful of pod templates defined and specified "Concurrency Limits" on those pod templates. What I noticed is that sometimes this doesn't seem to get respected.
Version of jenkins: 2.289.1 (lts)
Version of kubernetes plugin: 1.29.6
I did some investigation by looking at the code and using the Script Console, unfortunately this is the end of where I'm able to figure out what's going on, but it should hopefully give a good starting point to someone that has more know-how about jenkins and the kubernetes plugin.
First I printed out the state of the KubernetesProvisioningLimits
this looked strange, there seemed to be a lot more values for the template id, than we have templates.
Then I further digged into the code and looped over all nodes (of a certain template).
This shows that some nodes seem to have a different template (and templateId), but if you do node.getCloud().getTemplates() the template cannot be found.
What could be the reason that the node have a different template than the one in the cloud linked to the same node?
Alternatively would it make more sense to use the pod template name instead of the id for the KubernetesProvisioningLimits?