Update Kubernetes deployments label selector
Description
We're trying to move over to GitLab for our CI/CD needs, and are testing out the new Kubernetes integrations for some projects here. We have some tooling we wish to deploy using Helm that works great, but we find the label selector used on the Environments dashboard screen when pulling out Kubernetes deployments is messing with our workflow a bit.
As far as I can tell, it tries to query for pods matching app=$CI_ENVIRONMENT_SLUG
in the namespace configured on the project; the problem is that most Helm charts we deploy already set another app
label on the releases - and we'd prefer not having to overwrite that one per-environment.
Would it be possible to have GitLab use a more appropriate label selector here? At least personally, I feel like using env=$CI_ENVIRONMENT_SLUG
is a much better query than using the app
label. The app is the same app regardless of environment, the varying factor is the environment.
Proposal
I propose that the label selector used by the Kubernetes environment deployment status is either configurable, or that it uses a label that makes it easier for people moving over to GitLab from other CI/CD systems to get up and running.
Links / references
Related issue https://gitlab.com/gitlab-org/gitlab-ee/issues/6389