Skip to content

Commit 705dbbb

Browse files
committed
feat: relabelings support for ServiceMonitor
Signed-off-by: pasteley <ceasebeing@gmail.com>
1 parent 64409d1 commit 705dbbb

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

charts/coredns/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
apiVersion: v2
22
name: coredns
3-
version: 1.45.2
3+
version: 1.45.3
44
appVersion: 1.13.1
55
home: https://coredns.io
66
icon: https://coredns.io/images/CoreDNS_Colour_Horizontal.png
@@ -20,4 +20,4 @@ type: application
2020
annotations:
2121
artifacthub.io/changes: |
2222
- kind: added
23-
description: Add configurable dnsPolicy for deployment
23+
description: Support for relabling in ServiceMonitor

charts/coredns/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ The command removes all the Kubernetes components associated with the chart and
127127
| `prometheus.monitor.namespace` | Selector to select which namespaces the Endpoints objects are discovered from. | `""` |
128128
| `prometheus.monitor.interval` | Scrape interval for polling the metrics endpoint. (E.g. "30s") | `""` |
129129
| `prometheus.monitor.selector` | Service selector | `{}` |
130+
| `prometheus.monitor.relabelings` | Relabelings to apply to samples before ingestion | `[]` |
130131
| `service.clusterIP` | IP address to assign to service | `""` |
131132
| `service.clusterIPs` | IP addresses to assign to service | `[]` |
132133
| `service.loadBalancerIP` | IP address to assign to load balancer (if supported) | `""` |

charts/coredns/templates/servicemonitor.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,8 @@ spec:
3737
{{- if .Values.prometheus.monitor.interval }}
3838
interval: {{ .Values.prometheus.monitor.interval }}
3939
{{- end }}
40+
{{- with .Values.prometheus.monitor.relabelings }}
41+
relabelings:
42+
{{- toYaml . | nindent 8 }}
43+
{{- end }}
4044
{{- end }}

charts/coredns/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ prometheus:
5151
namespace: ""
5252
interval: ""
5353
selector: {}
54+
# relabelings to apply to samples before ingestion
55+
# ref: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
56+
relabelings: []
5457

5558
service:
5659
# clusterIP: ""

0 commit comments

Comments
 (0)