Support specifying kubectl context in kubernetes executor
Problem
The Kubernetes executor contains a footgun: If no host is specified, it will try to guess the kube config.
- If
hostis specified, use that. - If the gitlab-runner is running inside kubernetes itself, it will attempt to use that.
- Else, it defaults to the current kubectl context.
This means that if you are running gitlab-runner locally, and have various contexts configured for production access, e.g. via glsh, you run the risk of the local jobs being sent to a production cluster.
Proposal
We should allow the context to be specified explicitly.
cc @rehab