Skip to content

Commit 14e5c23

Browse files
[kube-prometheus-stack] Added attachMetadata option to additionalServiceMonitors and additionalPodMonitors (#6106)
Co-authored-by: Jan-Otto Kröpke <[email protected]>
1 parent 6ff501a commit 14e5c23

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

charts/kube-prometheus-stack/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ name: kube-prometheus-stack
3131
sources:
3232
- https://github.com/prometheus-community/helm-charts
3333
- https://github.com/prometheus-operator/kube-prometheus
34-
version: 77.4.0
34+
version: 77.5.0
3535
# renovate: github=prometheus-operator/prometheus-operator
3636
appVersion: v0.85.0
3737
kubeVersion: ">=1.25.0-0"

charts/kube-prometheus-stack/templates/prometheus/podmonitors.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,9 @@ items:
3737
{{- if .fallbackScrapeProtocol }}
3838
fallbackScrapeProtocol: {{ .fallbackScrapeProtocol }}
3939
{{- end }}
40+
{{- with .attachMetadata }}
41+
attachMetadata:
42+
{{- toYaml . | nindent 8 }}
43+
{{- end }}
4044
{{- end }}
4145
{{- end }}

charts/kube-prometheus-stack/templates/prometheus/servicemonitors.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,9 @@ items:
3838
{{- if .fallbackScrapeProtocol }}
3939
fallbackScrapeProtocol: {{ .fallbackScrapeProtocol }}
4040
{{- end }}
41+
{{- with .attachMetadata }}
42+
attachMetadata:
43+
{{- toYaml . | nindent 8 }}
44+
{{- end }}
4145
{{- end }}
4246
{{- end }}

charts/kube-prometheus-stack/values.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4808,6 +4808,12 @@ prometheus:
48084808
##
48094809
# fallbackScrapeProtocol: ""
48104810

4811+
## Attaches node metadata to the discovered targets
4812+
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#monitoring.coreos.com/v1.AttachMetadata
4813+
##
4814+
# attachMetadata:
4815+
# node: true
4816+
48114817
additionalPodMonitors: []
48124818
## Name of the PodMonitor to create
48134819
##
@@ -4868,6 +4874,12 @@ prometheus:
48684874
##
48694875
# fallbackScrapeProtocol: ""
48704876

4877+
## Attaches node metadata to the discovered targets
4878+
## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/api-reference/api.md#monitoring.coreos.com/v1.AttachMetadata
4879+
##
4880+
# attachMetadata:
4881+
# node: true
4882+
48714883
## Configuration for thanosRuler
48724884
## ref: https://thanos.io/tip/components/rule.md/
48734885
##

0 commit comments

Comments
 (0)