-
Bug
-
Resolution: Not A Defect
-
Critical
-
None
I am finding the plugin unusable in a Jenkins environment pointing at Kubernetes that has RBAC enabled. I'm not sure if RBAC is significant, however, or if this is a 1.6 thing.
I've cloned the Github repo and built a from the master branch, even trying to upgrade the upstream kubernetes maven dependency to the latest, but still with no success.
I believe the namespace and service account used are configured correctly for RBAC.
All build steps fail with errors similar to the following:
[Pipeline] container [Pipeline] { [Pipeline] stage [Pipeline] { (Build a Go project) [Pipeline] sh [kubernetes-test] Running shell script Executing shell script inside container [golang] of pod [kubernetes-45d1fbd50e894c08a8faf108af59c027-238d09139a05f4] java.net.ProtocolException: Expected HTTP 101 response but was '400 Bad Request' at okhttp3.ws.WebSocketCall.createWebSocket(WebSocketCall.java:122) at okhttp3.ws.WebSocketCall.access$000(WebSocketCall.java:41) at okhttp3.ws.WebSocketCall$1.onResponse(WebSocketCall.java:97) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // container [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] } [Pipeline] // podTemplate [Pipeline] End of Pipeline io.fabric8.kubernetes.client.KubernetesClientException: Upgrade request required at io.fabric8.kubernetes.client.dsl.internal.ExecWebSocketListener.onFailure(ExecWebSocketListener.java:159) at okhttp3.ws.WebSocketCall$1.onResponse(WebSocketCall.java:99) at okhttp3.RealCall$AsyncCall.execute(RealCall.java:126) at okhttp3.internal.NamedRunnable.run(NamedRunnable.java:32) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) Finished: FAILURE
I'm using a simple cut-down version of the example pipeline script on the Github README:
podTemplate(label: 'mypod', containers: [ containerTemplate(name: 'golang', image: 'golang:1.8', ttyEnabled: true, command: 'cat') ]) { node('mypod') { stage('Get a Golang project') { git url: 'https://github.com/hashicorp/terraform.git' container('golang') { stage('Build a Go project') { sh """ mkdir -p /go/src/github.com/hashicorp ln -s `pwd` /go/src/github.com/hashicorp/terraform cd /go/src/github.com/hashicorp/terraform && make core-dev """ } } } } }