Expand default labels on build pods
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do?
Expand the range of default labels on pod created by the Kubernetes executor. This allows other systems get more insights into the created pods, e.g. for cost management/tracking.
Why was this MR needed?
Some relevant build information is only exported as Kubernetes annotations, which are not allways picked up by external tools. Now we export more information deliberately as labels.
Which labels and annotation we want on build pods has been hashed out over here.
What's the best way to test this MR?
- default:
- launch a build
- inspect the pod
- see that the pod has the documented labels
- blocking overwrites:
- set additional pod labels:
- one in the
runner.gitlab.comnamespace in the runner config (e.g. "runner.gitlab.com/fromRunnerConfig" = "foo") - another in the
runner.gitlab.comnamespace in the pipeline config (e.g. "runner.gitlab.com/fromPipelineCOnfig" = "foo")
- one in the
- launch a build
- inspect the pod
- see, that hose labels are not on the pod
- set additional pod labels:
What are the relevant issue numbers?
closes: #38359 (closed)
Edited by Hannes Hörl