Skip to content

feat: added global labelselector feature for podmonitors#402

Merged
lhotari merged 2 commits into
apache:masterfrom
kovaxur:podmonitor-labelselector
May 4, 2026
Merged

feat: added global labelselector feature for podmonitors#402
lhotari merged 2 commits into
apache:masterfrom
kovaxur:podmonitor-labelselector

Conversation

@kovaxur
Copy link
Copy Markdown
Contributor

@kovaxur kovaxur commented Oct 26, 2023

Fixes #401

Motivation

We are using grafana-agent, which uses label selector for podMonitors, so we need to be able to set custom labels on the podMonitors resources.

Modifications

Added a global variable to set custom labels for all podMonitors. If someone needs more granular label setting, it needs to be implemented for each service.

Verifying this change

  • Make sure that the change passes the CI checks.

@lhotari
Copy link
Copy Markdown
Member

lhotari commented Mar 19, 2026

@kovaxur Please rebase. The pod monitors changed in #592

PR apache#592 migrated all *-podmonitor.yaml templates to use the shared
pulsar.podMonitor helper in _monitor.tpl, which renders either a
Prometheus PodMonitor or a VictoriaMetrics VMPodScrape resource.

Adapted the customLabels feature to the new structure by injecting
the labels in the shared helper instead of in each individual file,
so they apply to both resource kinds and to all components covered
by the helper (broker, bookkeeper, autorecovery, proxy, zookeeper,
oxia-coordinator, oxia-server, standalone).
@lhotari lhotari merged commit 5d3ca55 into apache:master May 4, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow the set of custom labels on the podMonitor resources

3 participants