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

Pod inheritance not working as expected for declarative pipeline

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • kubernetes-plugin
    • None
    • Jenkins 2.319.1 / Kubernetes Plugin 1.31.1

      Hi there,

      I'm currently experiencing issues merging a pod yaml file into a default pod template - all that happens is the default container will load without merging in my custom changes below...anyone know why?

      pod.yaml -

      apiVersion: "v1" 
      kind: "Pod" 
      spec: 
      containers: 
      - env: 
      - name: "VAULT_TOKEN" 
      valueFrom: secretKeyRef: 
      key: "jenkins" 
      name: "vault-token-custom"
       optional: false 
      image: "redacted/some:image"
      name: "jnlp"
      

       

      pipeline {
       agent {
       kubernetes {
       inheritFrom 'docker'
       yamlFile 'pod.yaml'
       yamlMergeStrategy merge()
       }
       }

            Unassigned Unassigned
            andylw andylw w
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: