[JIRA] (JENKINS-57841) Better default command for container templates

3 views
Skip to first unread message

jglick@cloudbees.com (JIRA)

unread,
Jun 4, 2019, 9:38:03 AM6/4/19
to jenkinsc...@googlegroups.com
Jesse Glick created an issue
 
Jenkins / Improvement JENKINS-57841
Better default command for container templates
Issue Type: Improvement Improvement
Assignee: Carlos Sanchez
Components: kubernetes-plugin
Created: 2019-06-04 13:37
Labels: ux
Priority: Minor Minor
Reporter: Jesse Glick

Current documentation examples and tests generally use something like

containerTemplate(name: 'busybox', image: 'busybox', command: '/bin/cat', ttyEnabled: true)

to indicate that the container should go to sleep while waiting for exec calls in. While this works, it is rather obscure and ugly. Few users are likely to be immediately familiar with the ttyEnabled flag, and even then it is less than obvious why the interaction with cat would result in a container sleeping.

Better to use e.g.

containerTemplate(name: 'busybox', image: 'busybox', command: 'sleep', args: '99d')

which is self-explanatory. (GNU sleep accepts infinity as an argument, but POSIX does not specify it. POSIX does not seem to specify the d suffix either, but Busybox accepts it nonetheless. sleep 9999999 might be the most conservative choice.)

Better still to make this the default (if an image includes cat it probably includes sleep too) so users do not have to think about this technicality:

containerTemplate(name: 'busybox', image: 'busybox')
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jglick@cloudbees.com (JIRA)

unread,
Jul 16, 2019, 3:28:01 PM7/16/19
to jenkinsc...@googlegroups.com
Jesse Glick assigned an issue to Unassigned
Change By: Jesse Glick
Assignee: Carlos Sanchez

jglick@cloudbees.com (JIRA)

unread,
Oct 23, 2019, 5:24:01 PM10/23/19
to jenkinsc...@googlegroups.com
Jesse Glick commented on Improvement JENKINS-57841
 
Re: Better default command for container templates

For Windows pods (JENKINS-53500), the reasonable default seems to be

    command:
    - powershell
    args:
    - Start-Sleep
    - 999999
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages