Merge pull request #1766 from code-chris/kube-state-metrics-servicemonitor

[bitnami/kube-state-metrics]: Add metricRelabelings to ServiceMonitor
This commit is contained in:
Sameer Naik
2019-12-23 10:52:53 +05:30
committed by GitHub
5 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ apiVersion: v1
appVersion: 1.9.0
description: kube-state-metrics is a simple service that listens to the Kubernetes API server and generates metrics about the state of the objects.
name: kube-state-metrics
version: 0.1.4
version: 0.1.5
keywords:
- prometheus
- kube-state-metrics
+1
View File
@@ -133,6 +133,7 @@ The following table lists the configurable parameters of the kube-state-metrics
| `serviceMonitor.interval` | Scrape interval (use by default, falling back to Prometheus' default) | `nil` |
| `serviceMonitor.jobLabel` | The name of the label on the target service to use as the job name in prometheus. | `nil` |
| `serviceMonitor.selector` | ServiceMonitor selector labels | `[]` |
| `serviceMonitor.metricRelabelings` | ServiceMonitor metricRelabelings | `[]` |
Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example the following command sets the `replicas` of the kube-state-metrics Pods to `2`.
@@ -24,6 +24,9 @@ spec:
{{- if .Values.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }}
{{- end }}
{{- if .Values.serviceMonitor.metricRelabelings }}
metricRelabelings: {{- include "kube-state-metrics.tplValue" ( dict "value" .Values.serviceMonitor.metricRelabelings "context" $) | nindent 8 }}
{{- end }}
namespaceSelector:
matchNames:
- {{ .Release.Namespace }}
@@ -243,3 +243,8 @@ serviceMonitor:
##
# selector:
# prometheus: my-prometheus
## Metric relabeling
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
##
# metricRelabelings: []
+5
View File
@@ -243,3 +243,8 @@ serviceMonitor:
##
# selector:
# prometheus: my-prometheus
## Metric relabeling
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
##
# metricRelabelings: []