[JIRA] (JENKINS-55960) Missing DeclarativePipeline podTemplate parameters

2 views
Skip to first unread message

michael.chinkov@gmail.com (JIRA)

unread,
Feb 4, 2019, 10:46:02 AM2/4/19
to jenkinsc...@googlegroups.com
Mikhail Chinkov created an issue
 
Jenkins / Bug JENKINS-55960
Missing DeclarativePipeline podTemplate parameters
Issue Type: Bug Bug
Assignee: Mikhail Chinkov
Components: kubernetes-plugin
Created: 2019-02-04 15:45
Environment: Jenkins: 2.138.2
Kubernetes-plugin: 1.12.4
Labels: plugin kuberentes declarative declarative-variable-and-method-resolution
Priority: Major Major
Reporter: Mikhail Chinkov

The issue is that the DeclarativePipeline support on kubernetes-plugin is:

  1. Not complete - some options are missing
  2. Not aligned with Documentation - by reading docs, I assume I can use all options in declarativePipeline

Example: I'm trying to introduce `slaveConnectTimeout` in my pipeline, because 100 is ridiculously small if you want to pre-warm caches or so. Here is what I get

 

WorkflowScript: 8: Invalid config option "slaveConnectTimeout" for agent type "kubernetes". Valid config options are [activeDeadlineSeconds, cloud, containerTemplate, containerTemplates, defaultContainer, idleMinutes, inheritFrom, instanceCap, label, nodeSelector, serviceAccount, workingDir, yaml, yamlFile] @ line 8, column 13.
               slaveConnectTimeout 1800

What's actually missing here:

  • slaveConnectTimeout Timeout in seconds for an agent to be online.
  • name The name of the pod.
  • namespace The namespace of the pod.
  • nodeUsageMode Either 'NORMAL' or 'EXCLUSIVE', this controls whether Jenkins only schedules jobs with label expressions matching or use the node as much as possible.
  • volumes Volumes that are defined for the pod and are mounted by ALL containers.
  • envVars Environment variables that are applied to ALL containers.
    • envVar An environment variable whose value is defined inline.
    • secretEnvVar An environment variable whose value is derived from a Kubernetes secret.
  • imagePullSecrets List of pull secret names
  • annotations Annotations to apply to the pod.

Assuming that `volumes`, `envVars`, `imagePullSecrets` and `annotations` by design have a structure which is hard to read and `name` which looks quite useless here - I'd suggest to add `slaveConnectTimeout`, `namespace` and `nodeUsageMode` to Declarative Pipeline class.

Gonna try to do this by myself, will create the branch/PR

 

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

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Feb 12, 2019, 12:29:02 PM2/12/19
to jenkinsc...@googlegroups.com
Carlos Sanchez started work on Bug JENKINS-55960
 
Change By: Carlos Sanchez
Status: Open In Progress

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Feb 12, 2019, 12:29:03 PM2/12/19
to jenkinsc...@googlegroups.com

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Feb 12, 2019, 12:30:02 PM2/12/19
to jenkinsc...@googlegroups.com

jenkins-ci@carlossanchez.eu (JIRA)

unread,
Feb 12, 2019, 12:30:02 PM2/12/19
to jenkinsc...@googlegroups.com
Carlos Sanchez commented on Bug JENKINS-55960
 
Re: Missing DeclarativePipeline podTemplate parameters

The goal was to move to yaml as much as possible but I guess it's ok to add it for now

jglick@cloudbees.com (JIRA)

unread,
Jun 12, 2019, 3:36:02 PM6/12/19
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Labels: declarative declarative-variable-and-method-resolution kuberentes plugin
Reply all
Reply to author
Forward
0 new messages