diff --git a/stable/prometheus/Chart.yaml b/stable/prometheus/Chart.yaml index 894afdbe1c..b4258b3c58 100755 --- a/stable/prometheus/Chart.yaml +++ b/stable/prometheus/Chart.yaml @@ -1,5 +1,5 @@ name: prometheus -version: 7.1.4 +version: 7.2.0 appVersion: 2.4.3 description: Prometheus is a monitoring system and time series database. home: https://prometheus.io/ diff --git a/stable/prometheus/README.md b/stable/prometheus/README.md index 0a411496b4..1edc1800d1 100644 --- a/stable/prometheus/README.md +++ b/stable/prometheus/README.md @@ -274,6 +274,7 @@ Parameter | Description | Default `serverFiles.alerts` | Prometheus server alerts configuration | `{}` `serverFiles.rules` | Prometheus server rules configuration | `{}` `serverFiles.prometheus.yml` | Prometheus server scrape configuration | example configuration +`extraScrapeConfigs` | Prometheus server additional scrape configuration | "" `networkPolicy.enabled` | Enable NetworkPolicy | `false` | Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example, diff --git a/stable/prometheus/templates/server-configmap.yaml b/stable/prometheus/templates/server-configmap.yaml index 65f35907c0..1dde995387 100644 --- a/stable/prometheus/templates/server-configmap.yaml +++ b/stable/prometheus/templates/server-configmap.yaml @@ -19,6 +19,9 @@ data: {{- end }} {{ toYaml $value | default "{}" | indent 4 }} {{- if eq $key "prometheus.yml" -}} +{{- if $root.Values.extraScrapeConfigs }} +{{ tpl $root.Values.extraScrapeConfigs $root | indent 4 }} +{{- end -}} {{- if $root.Values.alertmanager.enabled }} alerting: alertmanagers: diff --git a/stable/prometheus/values.yaml b/stable/prometheus/values.yaml index 72d5bd6330..d0f4c2462c 100644 --- a/stable/prometheus/values.yaml +++ b/stable/prometheus/values.yaml @@ -1053,6 +1053,25 @@ serverFiles: action: replace target_label: kubernetes_pod_name +# adds additional scrape configs to prometheus.yml +# must be a string so you have to add a | after extraScrapeConfigs: +# example adds prometheus-blackbox-exporter scrape config +extraScrapeConfigs: + # - job_name: 'prometheus-blackbox-exporter' + # metrics_path: /probe + # params: + # module: [http_2xx] + # static_configs: + # - targets: + # - https://example.com + # relabel_configs: + # - source_labels: [__address__] + # target_label: __param_target + # - source_labels: [__param_target] + # target_label: instance + # - target_label: __address__ + # replacement: prometheus-blackbox-exporter:9115 + networkPolicy: ## Enable creation of NetworkPolicy resources. ##