-
Bug
-
Resolution: Not A Defect
-
Blocker
-
None
-
Jenkins 2.362
kubernetes (plugin version) 3690.va_9ddf6635481
Currently following documentation found at https://plugins.jenkins.io/kubernetes/#plugin-content-inheritance for leveraging pod template inheritance.
Following the example does not produce the expected outcome where the resulting pod container uses an updated image for the specified container.
JCasC pod base template definition
templates: - name: "jenkins-agent" namespace: "jenkins-agents" containers: - name: jnlp image: jnlp:latest command: "tail -f /dev/null" workingDir: "/home/jenkins/agent" - name: maven image: maven:latest command: "tail -f /dev/null"
Declarative pipeline definition
pipeline { agent { kubernetes { cloud 'gke' inheritFrom 'jenkins-agent' yaml ''' spec: containers: - name: maven image: maven:3.8.1-jdk-11 ''' } } stages { ... } }
The resulting agent pod still contains the base maven image rather than the attempted overridden version for the maven container.