Add support for Kubernetes labels
Description
There are a number of reasons that labels are useful for kubernetes pods.
- Dashboards/tracking/metrics
- Using the PodPresets feature in Kubernetes to open up more configuration options without relying on further development of the kubernetes executor (small effort for huge win)
- Using PodPresents to mount volumes, especially the docker socket, which is a blocker for a lot of people to get the basic functionality they need on the kubernetes executor (it currently is not useable for many common requirements).
Currently, the kubernetes runners don't support volumes (see https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/2258).
Proposal
Add the following format to config.toml under [[runners]]
=> [runners.kubernetes]
[runners.kubernetes.labels]
app: gitlab-kubernetes-executor
role: build
Links to related issues and merge requests / references
Currently, the kubernetes runners don't support volumes (see https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/issues/2258#note_27719401). While adding volumes would be great, adding labels would allow a workaround and are much less complex as they apply to the pod level and not the container level.