Unable to override global config pod template in pipeline

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Minor
    • None
    • Environment:
      jenkins 2.166
      kubernetes: 1.14.2
      kubernetes-pipeline: 1.5

      Our jenkins instance has a kubernetes pod template that's defined as the defaults provider, named `jenkins slave`

      `jenkins slave` containsĀ  single jnlp container template with a docker image defined, also containing working directory and the jnlp argsĀ ${computer.jnlpmac} ${computer.name} plus resource allocations and some environment variables

      In my pipeline i have a kube-slave.yml defined that gets loaded with

          agent {
              kubernetes {
                  cloud 'jenkins-jenkins'
                  label label()
                  defaultContainer 'jnlp'
                  yamlFile 'kube-slave.yaml' 
              }
          }
      

      A sample of the yaml file is attached.

      And the yaml file overrides the `jnlp` container with one that has a different image and resource requirements.Ā  However when the plugin attempts to combine the two templates, i end up with Combined parent + template where the override's name and env vars among other things are the overridden values, but the container itself its resource limits are the ones that were defined in the default provider.

            Assignee:
            Ioannis Canellos
            Reporter:
            Lucas Ridge
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: