agones icon indicating copy to clipboard operation
agones copied to clipboard

[Feature Proposal] - helm chart update to make the release label for the `ServiceMonitor` configurable

Open jessebot opened this issue 7 months ago • 3 comments

Is your feature request related to a problem? Please describe. Yes, currently Prometheus only scans for ServiceMonitors with the release: kube-prometheus-stack label, but it can't find the agones SeviceMonitors because the release label is hardcoded to the helm chart release of agones.

Describe the solution you'd like I'd like to be able to configure that label and others via a parameter called agones.metrics.serviceMonitor.labels that accepts a map.

Describe alternatives you've considered If the label isn't provided, we could also just default back to the agones helm chart release

Additional context I can get this done if you'd like.

Here's some context: https://github.com/prometheus-operator/kube-prometheus/issues/1392#issuecomment-1411719953

Link to the Agones Feature Proposal (if any) The link to the AFP PR.

Discussion Link (if any)

jessebot avatar May 09 '25 10:05 jessebot

This would still be nice, and we could also add agones.metrics.serviceMonitor.additonalLabels which is something that's done in say the external-secrets-operator helm chart, but I did find a workaround for now! In the kube-prometheus-stack helm chart you can do the following in your values.yaml:

prometheus:
  prometheusSpec:
    ruleSelectorNilUsesHelmValues: false
    serviceMonitorSelectorNilUsesHelmValues: false
    podMonitorSelectorNilUsesHelmValues: false
    probeSelectorNilUsesHelmValues: false

jessebot avatar May 09 '25 11:05 jessebot

'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions '

github-actions[bot] avatar Jun 15 '25 10:06 github-actions[bot]

I can work on this next weekend or the weekend after if no one else does.

jessebot avatar Jun 15 '25 20:06 jessebot

The main concern is to ensure the change is backward compatible so it doesn't unintentionally break any current users. As long as the existing labeling behavior remains the default when no custom labels are provided, feel free to submit a PR.

igooch avatar Jul 16 '25 06:07 igooch

'This issue is marked as Stale due to inactivity for more than 30 days. To avoid being marked as 'stale' please add 'awaiting-maintainer' label or add a comment. Thank you for your contributions '

github-actions[bot] avatar Aug 15 '25 10:08 github-actions[bot]

This issue is marked as obsolete due to inactivity for last 60 days. To avoid issue getting closed in next 30 days, please add a comment or add 'awaiting-maintainer' label. Thank you for your contributions

github-actions[bot] avatar Sep 15 '25 02:09 github-actions[bot]