-
Bug
-
Resolution: Fixed
-
Major
-
Jenkins: 2.138.2
Kubernetes-plugin: 1.12.4
The issue is that the DeclarativePipeline support on kubernetes-plugin is:
- Not complete - some options are missing
- 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
- links to
[JENKINS-55960] Missing DeclarativePipeline podTemplate parameters
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Remote Link | New: This issue links to "PR-421 (Web Link)" [ 22370 ] |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Review [ 10005 ] | New: Resolved [ 5 ] |
Labels | Original: declarative declarative-variable-and-method-resolution kuberentes plugin | New: declarative declarative-variable-and-method-resolution plugin |