[JIRA] (JENKINS-56921) Pod template does not honor the namespace field

3 views
Skip to first unread message

sajit.kunnumkal@gmail.com (JIRA)

unread,
Apr 6, 2019, 8:45:02 AM4/6/19
to jenkinsc...@googlegroups.com
sajit kunnumkal created an issue
 
Jenkins / Bug JENKINS-56921
Pod template does not honor the namespace field
Issue Type: Bug Bug
Assignee: Carlos Sanchez
Components: kubernetes-plugin
Created: 2019-04-06 12:44
Priority: Major Major
Reporter: sajit kunnumkal

With the following pod template configuration & as specified in the documentation I would expect the pod to be created in specified namespace. but it does not honor the namespace

 

 {{podTemplate(label: 'builder-pod', 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') {}}}}{{...}}{{{{    }}}}}

{}{{ }}}{}}

{}

the builder-pod is getting created in the default namespace instead of jenkins namespace

{{}}

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

sajit.kunnumkal@gmail.com (JIRA)

unread,
Apr 6, 2019, 8:48:01 AM4/6/19
to jenkinsc...@googlegroups.com
sajit kunnumkal updated an issue
Change By: sajit kunnumkal
With the following pod template configuration & as specified in the documentation I would expect the pod to be created in specified namespace. but it does not honor the namespace

 

 {{{{ podTemplate(label: 'builder-pod', 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') { }}}}{{{{...}}}}{{{{
                                              } }}}}

{{{{                                         } }}}{{{{
                          } }}}}{{{{}}}}}

{{{{}}}}  

{{the builder-pod is getting created in the default namespace instead of jenkins namespace}}

{{}}  

jglick@cloudbees.com (JIRA)

unread,
Jul 16, 2019, 3:37:02 PM7/16/19
to jenkinsc...@googlegroups.com
Jesse Glick resolved as Cannot Reproduce
 

This test says it works.

Change By: Jesse Glick
Status: Open Resolved
Resolution: Cannot Reproduce
Reply all
Reply to author
Forward
0 new messages