Improve Kubernetes support
This is made on top of https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/merge_requests/30.
It improves support for:
- reading credentials from
.kube/config
orKUBECONFIG
env variable, - supporting missing docker image,
- removing helper containers to run clone/artifacts/caching support,
- adding integration tests for most common scenarios: abort, cancel, missing image, build failure,
- adds a notice to license
executors/kubernetes/exec.go
that this file was modified
Merge request reports
Activity
Added 1 commit:
- d35c01bd - Make lint happy
Added 41 commits:
-
d35c01bd...2e36ec6c - 40 commits from branch
master
- f331b67b - Merge remote-tracking branch 'origin/master' into kubernetes-support
-
d35c01bd...2e36ec6c - 40 commits from branch
Added 1 commit:
- d35c01bd - Make lint happy
338 308 err := e.Prepare(test.GlobalConfig, test.RunnerConfig, test.Build) 339 309 340 310 if err != nil { 311 if test.Error { 312 assert.Error(t, err) 313 } else { 314 assert.NoError(t, err) 315 } 341 316 if !test.Error { 342 317 t.Errorf("Got error. Expected: %v", test.Expected) 343 318 } - Resolved by Kamil Trzciński
- Resolved by Kamil Trzciński
- Resolved by Kamil Trzciński
- Resolved by Kamil Trzciński
I don't have strong opinion on dependency on
kubectl
, but by executingkubectl cluster-info
we are also ensuring that the credentials are valid and allow to access currently running cluster.Edited by Kamil TrzcińskiThe tests pass locally \o/
ok gitlab.com/gitlab-org/gitlab-ci-multi-runner/executors/kubernetes 156.440s coverage: 49.7% of statements
Coverage seems low compared to docker (62%), docker-machine (71%), shell (73.8%) and virtualbox (67.5%), but I think it's fibbing - profile attached.
About half of my comments from !30 (merged) appear to be addressed, it's a bit difficult to swap from one to the other
I agree it's not perfect.
mentioned in issue omnibus-gitlab#1412 (closed)
You have to configure access to Kubernetes cluster, then you will see this:
coverage: 80.8% of statements ok gitlab.com/gitlab-org/gitlab-ci-multi-runner/executors/kubernetes 27.302s
Added 1 commit:
- 45e8436e - Update Kubernetes documentation
Added 1 commit:
- fcaf28c3 - Close kubeClient on Cleanup