Skip to content

Comments

[prometheus-blackbox-exporter] Allow ServiceMonitor CRD apiVersion override#6607

Open
firasmosbehi wants to merge 3 commits intoprometheus-community:mainfrom
firasmosbehi:fix/blackbox-servicemonitor-apiversion-6086
Open

[prometheus-blackbox-exporter] Allow ServiceMonitor CRD apiVersion override#6607
firasmosbehi wants to merge 3 commits intoprometheus-community:mainfrom
firasmosbehi:fix/blackbox-servicemonitor-apiversion-6086

Conversation

@firasmosbehi
Copy link
Contributor

What this PR does

This change makes the ServiceMonitor CRD API version configurable in the prometheus-blackbox-exporter chart.

Why

Some managed environments use a provider-specific ServiceMonitor API group (for example azmonitoring.coreos.com/v1) instead of monitoring.coreos.com/v1.

Changes

  • add serviceMonitor.apiVersion with default monitoring.coreos.com/v1
  • use serviceMonitor.apiVersion in:
    • templates/servicemonitor.yaml
    • templates/selfservicemonitor.yaml
  • add CI values case to validate override rendering
  • bump chart version 11.8.0 -> 11.8.1

Closes #6086

Testing

  • ct lint --config .github/linters/ct.yaml --charts charts/prometheus-blackbox-exporter
  • helm template test charts/prometheus-blackbox-exporter --set serviceMonitor.enabled=true --set-string 'serviceMonitor.targets[0].name=example' --set-string 'serviceMonitor.targets[0].url=https://example.com' --set serviceMonitor.apiVersion=azmonitoring.coreos.com/v1 | rg '^apiVersion: azmonitoring.coreos.com/v1$'

Signed-off-by: Firas Mosbehi <firas.mosbehi@insat.ucar.tn>
… install case

Signed-off-by: Firas Mosbehi <firas.mosbehi@insat.ucar.tn>
Signed-off-by: André Bauer <monotek@users.noreply.github.com>
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.

[prometheus-blackbox-exporter] Allow ServiceMonitor CRD API override

2 participants