Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-46450

Since 0.12, pod templates got inherited even if not nested

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • kubernetes-plugin
    • None
    • Jenkins 2.75
      Kubernetes plugin 0.12

      Hello there !

      Since I updated Kubernetes plugin from 0.11 to 0.12 I've a weird behavior: My podTemplates got inherited with no reasons. Here is a Jenkinsfile:

       

      stage("A") {
          podTemplate(label: "a") {
              node("a") {
                  sh "echo a"
              }
          }
      }
      
      stage("B") {
          podTemplate(label: "b") {
              node("b") {
                  sh "echo b"
                  sh "sleep 100"
              }
          }
      }
      
      stage("C") {
          podTemplate(label: "c") {
              node("c") {
                  sh "echo c"
                  sh "sleep 100"
              }
          }
      }
      

      This result in B inherited from A and C inherited from B and A:

       

      Even if I set "inheritFrom" in the podTemplate annotation it got inherited.

      This is a blocker for me because I use annotations on my pods (init containers) and as https://issues.jenkins-ci.org/browse/JENKINS-46433 describe they don't get inherited.

      I'll revert to 0.11 in the meantime.

       

      By the way, thanks a lot for your work on this plugin guys, you rock.

            csanchez Carlos Sanchez
            clementgautier Clement Gautier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: