Draft: Move K8S labels/annotations definition to a single space

What does this MR do?

Move K8S labels/annotations definition to a single space

When creating resources though K8S executor, we do set labels and annotations on them. We also do use these labels/annotations for matchers in other resources, for example: we set a job unique Pod name label on the job Pod and next we reference this label when preparing a Kubernetes Service for that Pod.

That works okay, but the problem is that each time we create the label key and value by hand. That brings a risk that through code evolution we may change some crucial label definition in one space, not noticing it's not changed in the other place where it's referenced.

This commit brings labels definitions to a single place. Instead of hand crafting the label/annotation definition each time it's needed, we're reaching to a method in the factory that will always return exactly the same definition.

Why was this MR needed?

What's the best way to test this MR?

What are the relevant issue numbers?

Merge request reports

Loading