-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.164.1
GKE w/ Kubernetes 1.12.5-gke.10
Agents running jenkins/jnlp-slave:3.27-1
- kubernetes:1.14.9
- workflow-aggregator:2.6
- blueocean:1.13.2
- git:3.9.3
- github:1.29.4
- github-branch-source:2.4.2
- configuration-as-code:1.7
- configuration-as-code-support:1.7
- google-cloudbuild:0.2.2
- google-oauth-plugin:0.7
Installed with Helm ChartJenkins 2.164.1 GKE w/ Kubernetes 1.12.5-gke.10 Agents running jenkins/jnlp-slave:3.27-1 - kubernetes:1.14.9 - workflow-aggregator:2.6 - blueocean:1.13.2 - git:3.9.3 - github:1.29.4 - github-branch-source:2.4.2 - configuration-as-code:1.7 - configuration-as-code-support:1.7 - google-cloudbuild:0.2.2 - google-oauth-plugin:0.7 Installed with Helm Chart
I've created a build step with the following pod template (with some elided content):
podTemplate(label: label, yaml: """ apiVersion: v1 kind: Pod spec: containers: - name: db image: mdillon/postgis:10-alpine - name: elasticsearch image: docker.elastic.co/elasticsearch/elasticsearch:6.1.3 env: - name: discovery.type value: single-node - name: memcached, image: memcached:1.5.10-alpine - name: redis, image: redis:4.0.6-alpine - name: web, image: ${info['image']} """) { node(label) { // etc } }
When I attempt to run my pipeline, it throws
Also: hudson.AbortException: Container Names MUST match RFC 1123 - They can only contain lowercase letters, numbers or dashes: memcached,, redis,, web, at org.csanchez.jenkins.plugins.kubernetes.pipeline.PodTemplateStepExecution.start(PodTemplateStepExecution.java:118) at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:268) at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:176) at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122) at jdk.internal.reflect.GeneratedMethodAccessor607.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:157) at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:155) at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:142) at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155) at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:159) at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17) at WorkflowScript.buildParallelStage(WorkflowScript:155) at WorkflowScript.buildTesters(WorkflowScript:55)
Just to test things, I used println to output the full yaml string and tossed that at kubectl apply -f which happily accepted the file and deployed my pod.
Am I missing something here, or is the plugin just failing to (for some reason) parse two of my containers' names but not the others?