Hi,
I encountered the same issue when trying to override the jnlp container (to tailor its resource request/limit).
It works using podTemplate/containerTemplate but not YAML.
Playing with yamlMergeStrategy & inheritFrom was ineffective.
I identified that at one point the controller configuration was always taking precedence over the YAML in the Jenkinsfile (after several nested template merges).
The plugin version was 3743.v1fa_4c724c3b_7
In org.csanchez.jenkins.plugins.kubernetes.PodTemplateBuilder.build() #L293
Pod pod = combine(template.getYamlsPod(), builder.endSpec().build());
The YAML template from the Jenkinsfile is part of template.getYamlsPod(), while the controller config is part of builder.endSpec().build().
The YAML from the Jenkinsfile is processed as the parent, not as the template
I am not sure if reverting the 2 params solves the issue without side effects (it'll require in-depth testing) or if the bug is in fact somewhere else.
More worrying: I found a test for jnlp override. It exists and it passes while IRL it does not work. I think the init of this test does not match our reality (jnlp customized at controller level with a containerTemplate)
https://github.com/jenkinsci/kubernetes-plugin/blob/3743.v1fa_4c724c3b_7/src/test/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplateBuilderTest.java#L451
it is consistent with what Vincent describes (assuming UI fields == containerTemplate), but not with the documentation.
Regards,
cc acontes
There is no contradiction : UI fields always take precedence on what is defined by yaml.