Skip to content

Commit

Permalink
feat(keycloakx): make metricRelabelings possible on serviceMonitors
Browse files Browse the repository at this point in the history
Signed-off-by: wilmarguida <w.denouden@guida.nl>
  • Loading branch information
wilmardo committed Feb 5, 2025
1 parent 94bc29e commit ceb38dd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions charts/keycloakx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ The following table lists the configurable parameters of the Keycloak-X chart an
| `serviceMonitor.interval` | Interval at which Prometheus scrapes metrics | `10s` |
| `serviceMonitor.scrapeTimeout` | Timeout for scraping | `10s` |
| `serviceMonitor.relabelings` | Relabelings for the Servicemonitor | `[]` |
| `serviceMonitor.metricRelabelings` | Relabelings for the Servicemonitor | `[]` |
| `serviceMonitor.path` | The path at which metrics are served | `{{ tpl .Values.http.relativePath $ \| trimSuffix "/" }}/metrics` |
| `serviceMonitor.port` | The Service port at which metrics are served | `http` |
| `extraServiceMonitor.enabled` | If `true`, an additional ServiceMonitor resource for the prometheus-operator is created. Could be used for additional metrics via [Keycloak Metrics SPI](https://github.com/aerogear/keycloak-metrics-spi) | `false` |
Expand All @@ -203,6 +204,7 @@ The following table lists the configurable parameters of the Keycloak-X chart an
| `extraServiceMonitor.scrapeTimeout` | Timeout for scraping | `10s` |

| `extraServiceMonitor.relabelings` | Relabelings for the Servicemonitor | `[]` |
| `serviceMonitor.metricRelabelings` | Relabelings for the Servicemonitor | `[]` |
| `extraServiceMonitor.path` | The path at which metrics are served | `{{ tpl .Values.http.relativePath $ \| trimSuffix "/" }}/metrics` |
| `extraServiceMonitor.port` | The Service port at which metrics are served | `http` |
| `prometheusRule.enabled` | If `true`, a PrometheusRule resource for the prometheus-operator is created | `false` |
Expand Down
4 changes: 4 additions & 0 deletions charts/keycloakx/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ spec:
relabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 4 additions & 0 deletions charts/keycloakx/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,8 @@ serviceMonitor:
scrapeTimeout: 10s
# Relabelings for the Servicemonitor
relabelings: []
# metricRelabelings for the Servicemonitor
metricRelabelings: []
# The path at which metrics are served
path: '{{ tpl .Values.http.relativePath $ | trimSuffix "/" }}/metrics'
# The Service port at which metrics are served
Expand All @@ -464,6 +466,8 @@ extraServiceMonitor:
scrapeTimeout: 10s
# Relabelings for the Servicemonitor
relabelings: []
# metricRelabelings for the Servicemonitor
metricRelabelings: []
# The path at which metrics are served
path: '{{ tpl .Values.http.relativePath $ | trimSuffix "/" }}/metrics'
# The Service port at which metrics are served
Expand Down

0 comments on commit ceb38dd

Please sign in to comment.