-
Bug
-
Resolution: Unresolved
-
Blocker
-
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 Pls check
We are also facing the same issue.
Running Jenkins 2.361.4-lts-alpine on helm chart 4.2.15
K8s Plugin:
kubernetes:3896.v19b_160fd9589
Yaml:
apiVersion: v1
kind: Pod
spec:
serviceAccount: jenkins-packer
serviceAccountName: jenkins-packer
command:
args:
securityContext:
fsGroup: 1337
tolerations:
operator: Equal
value: mgmt
effect: NoSchedule