[JIRA] (JENKINS-55094) "commands" and "args" are being defaulted using Kubernetes plugin

4 views
Skip to first unread message

mnrz57@gmail.com (JIRA)

unread,
Dec 9, 2018, 11:43:02 PM12/9/18
to jenkinsc...@googlegroups.com
Mohammad Norouzi created an issue
 
Jenkins / Bug JENKINS-55094
"commands" and "args" are being defaulted using Kubernetes plugin
Issue Type: Bug Bug
Assignee: Carlos Sanchez
Components: kubernetes-plugin
Created: 2018-12-10 04:42
Labels: kuberenetes-plugin
Priority: Minor Minor
Reporter: Mohammad Norouzi

We are using terraform and Jenkins configuration as yaml file to deploy Jenkins. When defining Kubernetes Pod templates, whether we set command and args to empty string or not providing it at all, after the deploying Jenkins or refreshing with new configuration, both values are being defaulted to:

 

command: /bin/sh -c 
args: cat

This causes issues because each docker image has its own entrypoint or cmd and this overrides them. So now everytime we redeploy Jenkins we have to manually remove command and args within the Jenkins user interface.

For example, the jnlp container requires to run a specific command defined in jenkins/jnlp-slave:3.23-1-alpine Dockerfile but those default value makes the container not to be able to communicate with Jenkins

 

I believe this is the issue with the UI template: https://github.com/jenkinsci/kubernetes-plugin/blob/b1ba0de0fc1fcc46937ab5f984289ff7b5594cef/src/main/resources/org/csanchez/jenkins/plugins/kubernetes/ContainerTemplate/config.jelly#L26

 

I have created a question in stackoverflow but nobody replied: https://stackoverflow.com/questions/53625733/jenkins-kubernetes-plugin-defaults-command-and-args-to-bash-even-if-we-set-them

 

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

mnrz57@gmail.com (JIRA)

unread,
Dec 12, 2018, 5:37:01 PM12/12/18
to jenkinsc...@googlegroups.com
Mohammad Norouzi commented on Bug JENKINS-55094
 
Re: "commands" and "args" are being defaulted using Kubernetes plugin

This is now becoming painful, We have a nice configuration but each redeployment of Jenkins requires someone manually remove those commands/args

mnrz57@gmail.com (JIRA)

unread,
Dec 17, 2018, 1:53:02 AM12/17/18
to jenkinsc...@googlegroups.com

it's a bit strange... looks like when we go to Jenkins -> Manage Jenkins > Configure System and make some change and hit save, those text boxes get defaulted, if there is no command or args already for them

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Dec 19, 2018, 9:02:02 AM12/19/18
to jenkinsc...@googlegroups.com

This works fine from the UI, are you using config-as-code plugin ?

mnrz57@gmail.com (JIRA)

unread,
Dec 19, 2018, 11:16:02 PM12/19/18
to jenkinsc...@googlegroups.com

Carlos Sanchez Yes we're using config-as-code plugin and the values are defined in a yaml file which then will be imported. If there is no command/args defined in the file, what you see in the UI is those default values. This causes all the builds that resume after Jenkins is up will wait forever because the containers' command/args are not correct and therefore they don't function properly

 

Thanks

 

jglick@cloudbees.com (JIRA)

unread,
Jun 12, 2019, 3:34:05 PM6/12/19
to jenkinsc...@googlegroups.com

jglick@cloudbees.com (JIRA)

unread,
Jul 16, 2019, 3:43:41 PM7/16/19
to jenkinsc...@googlegroups.com
Jesse Glick assigned an issue to Unassigned
Change By: Jesse Glick
Assignee: Carlos Sanchez
Reply all
Reply to author
Forward
0 new messages