ydb-kubernetes-operator icon indicating copy to clipboard operation
ydb-kubernetes-operator copied to clipboard

New field additionalPodLabels

Open kobzonega opened this issue 1 year ago • 0 comments
trafficstars

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Pull request type

Please check the type of change your PR introduces:

  • [ ] Bugfix
  • [x] Feature
  • [ ] Code style update (formatting, renaming)
  • [x] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] Documentation content changes
  • [ ] Other (please describe):

What is the current behavior?

No way to configure additional pod labels - only for Pod api resource. Field additionalLabels append new labels to all objects

What is the new behavior?

  • field additionalPodLabels in CRD Storage and Database spec
  • new method buildPodTemplateLabels to append additionalPodLabels for statefulset builders
  • refactor package labels and move code to methods buildLabels, buildSelectorLabels and buildeNodeSetLabels for each resource
  • save labels ydb.tech/database-nodeset, ydb.tech/storage-nodeset and ydb.tech/remote-cluster by func makeCommonLabels between resources recast

Other information

fix e2e test objects to maintain affinity rules

kobzonega avatar Jul 14 '24 07:07 kobzonega