Gitlab runner on kubernetes, how to add tags

Hello,

We have gitlab runner setup using helm chart to run on top of kubernetes (AWS EKS).
I’m trying to figure out how to automatically add certain tags to runners. When I’m looking examples from https://gitlab.com/gitlab-org/charts/gitlab-runner/blob/main/values.yaml
It says that tags: is deprecated.

How I can then set tags so that when runner pod is recreated it will automatically get certain tags?

Going thru gitlab UI and set them manually there is not very convinient because time to time gitlab-runners is re-created in k8s.
We have GitOps approach so everything is deployed to our k8s cluster with FluxCD automatically.

We use Gitlab.com Cloud.

Thanks!

1 Like

Hey kertzi, I’m facing the same issue. Have you found out how to have the tags persist?

Hi, just found this issue: Helm chart does not consider tags value (#434) · Issues · GitLab.org / charts / GitLab Runner · GitLab

Tags are now set via runners.tags: instead of tags:

1 Like

Thanks that works! Gitlab documentation needs amending.

The tags can be declared in the helm runner chart with:

runners:
    tags: "tag1, tag2"