Skip to content

kuberesource: use common labeling strategy#2514

Merged
burgerdev merged 1 commit into
mainfrom
burgerdev/labeling-with-strategy
Jul 8, 2026
Merged

kuberesource: use common labeling strategy#2514
burgerdev merged 1 commit into
mainfrom
burgerdev/labeling-with-strategy

Conversation

@burgerdev

Copy link
Copy Markdown
Member

This PR centralizes the definition of labels and label selectors, which used to be ad-hoc. As a result, labels for individual API resources may differ after this change, but the labels should at least be consistent.

@burgerdev burgerdev requested a review from davidweisse July 8, 2026 06:28
@burgerdev burgerdev added the changelog PRs that should be part of the release notes label Jul 8, 2026

@sespiros sespiros left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Should we mark this as a breaking change, or at least add a note? Since an in place upgrade (albeit not a documented procedure) would not be possible since we are changing the label selectors on Contrast-managed resources?

Comment thread internal/kuberesource/parts.go Outdated
@burgerdev burgerdev force-pushed the burgerdev/anno-label branch from ea6dabf to a136090 Compare July 8, 2026 11:41
Base automatically changed from burgerdev/anno-label to main July 8, 2026 12:47
Comment thread internal/kuberesource/parts.go Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also use kuberesource.SelectorLabels("kvstore", "coordinator")?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, it turns out that this selector is worth than useless, since we're already filtering by name and we don't set the label in RecoverConfigMaps. Removing it here, fixing RecoverConfigMaps in #2515.

@burgerdev burgerdev force-pushed the burgerdev/labeling-with-strategy branch 2 times, most recently from b41e4ee to 5ac6f3e Compare July 8, 2026 13:54
@burgerdev

Copy link
Copy Markdown
Member Author

Thanks! Should we mark this as a breaking change, or at least add a note? Since an in place upgrade (albeit not a documented procedure) would not be possible since we are changing the label selectors on Contrast-managed resources?

It's marked as changelog. The only thing where this matters would be the ConfigMap watcher, which was using the same label selector until I just changed it due to @davidweisse's remark. Let me revert that change for now, maybe I'll come up with something in #2515.

Co-authored-by: Spyros Seimenis <sespiros@users.noreply.github.com>
Co-authored-by: davidweisse <98460960+davidweisse@users.noreply.github.com>
@burgerdev burgerdev force-pushed the burgerdev/labeling-with-strategy branch from 5ac6f3e to 7cbb310 Compare July 8, 2026 14:06
@burgerdev burgerdev merged commit d2838fd into main Jul 8, 2026
20 of 21 checks passed
@burgerdev burgerdev deleted the burgerdev/labeling-with-strategy branch July 8, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog PRs that should be part of the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants