-
Bug
-
Resolution: Fixed
-
Major
-
None
-
-
1.22.6, 1.23.1
Affects 1.22.1
When using a pod template that has multiple labels defined, you get the following exception.
https://github.com/jenkinsci/kubernetes-plugin/pull/640#commitcomment-36483725
java.lang.IllegalArgumentException: duplicate key: jenkins/label at com.google.common.base.Preconditions.checkArgument(Preconditions.java:115) at com.google.common.collect.RegularImmutableMap.<init>(RegularImmutableMap.java:72) at com.google.common.collect.ImmutableMap$Builder.fromEntryList(ImmutableMap.java:245) at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:231) at org.csanchez.jenkins.plugins.kubernetes.PodTemplate.getLabelsMap(PodTemplate.java:387) at org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud.addProvisionedSlave(KubernetesCloud.java:599) at org.csanchez.jenkins.plugins.kubernetes.KubernetesCloud.provision(KubernetesCloud.java:542) at hudson.slaves.NodeProvisioner$StandardStrategyImpl.apply(NodeProvisioner.java:729) at hudson.slaves.NodeProvisioner.update(NodeProvisioner.java:334) at hudson.slaves.NodeProvisioner.access$900(NodeProvisioner.java:64) at hudson.slaves.NodeProvisioner$NodeProvisionerInvoker.doRun(NodeProvisioner.java:823) at hudson.triggers.SafeTimerTask.run(SafeTimerTask.java:70) at jenkins.security.ImpersonatingScheduledExecutorService$1.run(ImpersonatingScheduledExecutorService.java:58) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
- is caused by
-
JENKINS-60088 Change pod label - build label from unique key to value.
-
- Resolved
-
- is duplicated by
-
JENKINS-60735 No more trim on kubernetes labels
-
- Closed
-
- relates to
-
JENKINS-60610 Unable to set multi label in kubernetes pod template
-
- Closed
-
-
JENKINS-60623 Failed to count the # of live instances on Kubernetes after upgrade to 1.22.3 for slaves with multiple labes
-
- Closed
-
- links to
Also affected by this at work, had to pin the plugin down to 1.22.0 for the time being, until this gets solved.
Additional information: In versions 1.22.2, 1.22.3 and 1.22.4 (latest at the time of this writing) of the kubernetes plugin, we're getting a different error which might have also been introduced by this change (a bit of speculation on my side, but so it seems), so those newer versions are also unusable right now:
K8s endpoint in AWS EKS 1.13 (if it matters):
Agent pod labels: