Why are my pod template config maps not appearing in my Kubernetes plugin configurations?

11/27/2019

I have my Jenkins(2.190.3)(from docker hub) running inside my openshift(3.11) cluster. My Jenkins pod is being run by a jenkins service account user which has the "edit" role in my namespace.

I have the kubernetes plugin(1.21.3) and Openshift sync plugin(1.0.43) installed.

My configMap exist within the same namespace as my Jenkins and has the label role=jenkins-slave set. I have added the configMap to my Jenkins DC and it looks like this:

<org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
      <inheritFrom></inheritFrom>
      <name>dotnetcore22</name>
      <instanceCap>2147483647</instanceCap>
      <idleMinutes>0</idleMinutes>
      <label>dotnetcore22</label>
      <serviceAccount>jenkins</serviceAccount>
      <nodeSelector></nodeSelector>
      <volumes/>
      <containers>
        <org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
          <name>jnlp</name>
          <image>registry.access.redhat.com/dotnet/dotnet-22-jenkins-slave-rhel7</image>
          <privileged>false</privileged>
          <alwaysPullImage>false</alwaysPullImage>
          <workingDir>/tmp</workingDir>
          <command></command>
          <args>${computer.jnlpmac} ${computer.name}</args>
          <ttyEnabled>false</ttyEnabled>
          <resourceRequestCpu></resourceRequestCpu>
          <resourceRequestMemory></resourceRequestMemory>
          <resourceLimitCpu></resourceLimitCpu>
          <resourceLimitMemory></resourceLimitMemory>
          <envVars/>
        </org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
      </containers>
      <envVars/>
      <annotations/>
      <imagePullSecrets/>
      <nodeProperties/>
    </org.csanchez.jenkins.plugins.kubernetes.PodTemplate>

From the log output The sync plugin seems to be working.

 2019-11-27 18:37:45.452+0000 [id=35]   INFO    i.f.j.o.GlobalPluginConfigurationTimerTask#doRun: Confirming Jenkins is started
2019-11-27 18:37:45.452+0000 [id=35]    INFO    i.f.j.o.BuildConfigWatcher#start: Now handling startup build configs!!
2019-11-27 18:37:45.453+0000 [id=35]    INFO    i.f.j.o.PodTemplateUtils#propogateProxyConfigToReservedPodTemplates: Propogate proxy config to Reserved PodTemplates
2019-11-27 18:37:45.453+0000 [id=35]    INFO    i.f.j.o.PodTemplateUtils#propogateProxyConfigToReservedPodTemplates: Propogate proxy config to Reserved PodTemplates
2019-11-27 18:37:45.453+0000 [id=35]    INFO    i.f.j.o.PodTemplateUtils#propogateProxyConfigToReservedPodTemplates: Propogate proxy config to Reserved PodTemplates
2019-11-27 18:37:45.453+0000 [id=35]    INFO    i.f.j.o.ConfigMapWatcher#start: Now handling startup config maps!!
2019-11-27 18:37:45.453+0000 [id=35]    INFO    i.f.j.o.ImageStreamWatcher#start: Now handling startup image streams!!
2019-11-27 18:37:45.453+0000 [id=35]    INFO    i.f.j.o.PodTemplateUtils#propogateProxyConfigToReservedPodTemplates: Propogate proxy config to Reserved PodTemplates
2019-11-27 18:37:45.453+0000 [id=35]    INFO    i.f.j.o.PodTemplateUtils#propogateProxyConfigToReservedPodTemplates: Propogate proxy config to Reserved PodTemplates
2019-11-27 18:37:45.453+0000 [id=35]    INFO    i.f.j.o.SecretWatcher#start: Now handling startup secrets!!
2019-11-27 18:37:45.605+0000 [id=34]    INFO    o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2019-11-27 18:37:45.607+0000 [id=31]    INFO    o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2019-11-27 18:37:45.607+0000 [id=33]    INFO    o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2019-11-27 18:37:45.609+0000 [id=30]    INFO    o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2019-11-27 18:37:45.610+0000 [id=34]    INFO    i.f.j.o.SecretWatcher$1#doRun: creating Secret watch for namespace jenkins-test2 and resource version90577615
2019-11-27 18:37:45.612+0000 [id=30]    INFO    i.f.j.o.ConfigMapWatcher$1#doRun: creating ConfigMap watch for namespace jenkins-test2 and resource version 90577615
2019-11-27 18:37:45.615+0000 [id=27]    INFO    o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2019-11-27 18:37:45.621+0000 [id=33]    INFO    i.f.j.o.BuildConfigWatcher$1#doRun: creating BuildConfig watch for namespace jenkins-test2 and resource version 90577615
2019-11-27 18:37:45.629+0000 [id=27]    INFO    i.f.j.o.BuildWatcher$1#doRun: creating Build watch for namespace jenkins-test2 and resource version 90577615
2019-11-27 18:37:45.641+0000 [id=31]    INFO    i.f.j.o.ImageStreamWatcher$1#doRun: creating ImageStream watch for namespace jenkins-test2 and resource version 90577615
2019-11-27 18:37:45.663+0000 [id=127]   INFO    o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2019-11-27 18:37:45.668+0000 [id=128]   INFO    o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2019-11-27 18:37:45.680+0000 [id=129]   INFO    o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2019-11-27 18:37:45.687+0000 [id=130]   INFO    o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2019-11-27 18:37:45.688+0000 [id=27]    INFO    i.f.j.openshiftsync.BuildWatcher#reconcileRunsAndBuilds: Reconciling job runs and builds
2019-11-27 18:37:45.702+0000 [id=131]   INFO    o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2019-11-27 18:39:33.675+0000 [id=11]    INFO    o.internal.platform.Platform#log: ALPN callback dropped: HTTP/2 is disabled. Is alpn-boot on the boot class path?
2019-11-27 18:42:45.581+0000 [id=28]    INFO    i.f.j.openshiftsync.BuildWatcher#reconcileRunsAndBuilds: Reconciling job runs and builds

But when i check the Jenkins kubernetes plugin configurations, i dont see any pod templates defined. I should see the one from my configMap right ? Am i missing a step here ? enter image description here

Please help.

Thanks.

-- Micky
continuous-integration
jenkins
kubernetes
openshift

0 Answers