[Feature Proposal] - helm chart update to make the release label for the `ServiceMonitor` configurable
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)
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
'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 '
I can work on this next weekend or the weekend after if no one else does.
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.
'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 '
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