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

serviceAccountName for yaml pod template

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • kubernetes-plugin
    • None

      Hello.

      The kubernetes object `serviceAccountName` cannot apply to the pod if it sets via yaml.

      Reproduce:

        {code:java}
           agent {
              kubernetes{
                  yaml '''
                      apiVersion: v1
                      kind: Pod
                      metadata:
                      spec:
                        serviceAccountName: "jenkins v1"
                  '''
              }
          }
      

      Result:

      ---
      apiVersion: "v1"
      kind: "Pod"
      ...
      spec:
      ...
        serviceAccountName: "default"
      ... 
      Result:
      {code:java}
      ---
      apiVersion: "v1"
      kind: "Pod"
      ...
      spec:
      ...
        serviceAccountName: "default"
      ... 

       

      Version:
      Jenkins 2.375.2
      Kubernetes plugin Version 3896.v19b_160fd9589

            aura_aman Aman
            aliaksandr_shamchonak Aliaksandr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: