We have a jenkins master-slave architecture and using the Kubernetes Jenkins plugin. The podTemplate looks as below
podTemplate(label: 'builder-pod', cloud: 'kubernetes', containers: [
containerTemplate(
name: 'jnlp',
image: "${artifact_repo}/jenkins-slave",
ttyEnabled: true,
privileged: false,
alwaysPullImage: false,
workingDir: '/var/jenkins_home',
resourceRequestCpu: '1000m',
resourceRequestMemory: '1Gi',
resourceLimitMemory: '1.1Gi',
)
], volumes: [hostPathVolume(mountPath: '/var/run', hostPath: '/var/run')], namespace: 'jenkins') { //podtemplate
node('builder-pod') {
container('jnlp') {
For whatever reason the builder-pod is being created in default
namespace instead of the jenkins
namespace
Any idea what could be wrong? Thanks in advance.