Skip to content

Commit

Permalink
[prometheus] Allow setting scrape_config_files in prometheus config (p…
Browse files Browse the repository at this point in the history
…rometheus-community#3930)

Signed-off-by: Roshan Jobanputra <[email protected]>
Signed-off-by: Sacha <[email protected]>
  • Loading branch information
rjobanp authored and sachasmart committed Dec 14, 2023
1 parent 51c644c commit 9b34ee5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/prometheus/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: prometheus
appVersion: v2.47.0
version: 25.2.0
version: 25.3.0
kubeVersion: ">=1.19.0-0"
description: Prometheus is a monitoring system and time series database.
home: https://prometheus.io/
Expand Down
4 changes: 4 additions & 0 deletions charts/prometheus/templates/cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ data:
{{ $root.Values.server.exemplars | toYaml | indent 8 }}
{{- end }}
{{- end }}
{{- if $root.Values.scrapeConfigFiles }}
scrape_config_files:
{{ toYaml $root.Values.scrapeConfigFiles | indent 4 }}
{{- end }}
{{- end }}
{{- if eq $key "alerts" }}
{{- if and (not (empty $value)) (empty $value.groups) }}
Expand Down
3 changes: 3 additions & 0 deletions charts/prometheus/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,9 @@
}
}
},
"scrapeConfigFiles": {
"type": "array"
},
"serverFiles": {
"type": "object",
"properties": {
Expand Down
5 changes: 5 additions & 0 deletions charts/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,11 @@ server:
## Prometheus server ConfigMap entries for rule files (allow prometheus labels interpolation)
ruleFiles: {}

## Prometheus server ConfigMap entries for scrape_config_files
## (allows scrape configs defined in additional files)
##
scrapeConfigFiles: []

## Prometheus server ConfigMap entries
##
serverFiles:
Expand Down

0 comments on commit 9b34ee5

Please sign in to comment.