Skip to content

Commit 52466e3

Browse files
authored
applies least privileges config good practices
This commit applies least privileges config good practices to the Prometheus Remote Write Exporter docs (and fixes an invalid annotation) Signed-off-by: Michael Hausenblas <[email protected]>
1 parent 120eeab commit 52466e3

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

src/docs/getting-started/advanced-prometheus-remote-write-configurations.mdx

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ The Prometheus Receiver monitors each applications deployment using the service
4040
- job_name: 'kubernetes-service-endpoints'
4141
kubernetes_sd_configs:
4242
- role: endpoints
43-
44-
tls_config:
45-
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
46-
insecure_skip_verify: true
47-
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
4843

4944
relabel_configs:
5045
# Example relabel to scrape only endpoints that have
@@ -59,7 +54,7 @@ The Prometheus Receiver monitors each applications deployment using the service
5954
# source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
6055
# target_label: __scheme__
6156
# Example relabel to customize metric path based on endpoints
62-
# "prometheus.io/metric_path = <metric path>" annotation.
57+
# "prometheus.io/path = <metric path>" annotation.
6358
# - action: replace
6459
# regex: (.+)
6560
# source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
@@ -108,10 +103,6 @@ When monitoring pods, we want to watch the pod deployment patterns, total pod in
108103
sample_limit: 10000
109104
kubernetes_sd_configs:
110105
- role: pod
111-
tls_config:
112-
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
113-
insecure_skip_verify: true
114-
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
115106
relabel_configs:
116107
# Example relabel to scrape only endpoints that have
117108
# "prometheus.io/scrape = true" annotation.
@@ -125,7 +116,7 @@ When monitoring pods, we want to watch the pod deployment patterns, total pod in
125116
# source_labels: [__meta_kubernetes_service_annotation_prometheus_io_scheme]
126117
# target_label: __scheme__
127118
# Example relabel to customize metric path based on endpoints
128-
# "prometheus.io/metric_path = <metric path>" annotation.
119+
# "prometheus.io/path = <metric path>" annotation.
129120
# - action: replace
130121
# regex: (.+)
131122
# source_labels: [__meta_kubernetes_service_annotation_prometheus_io_path]
@@ -303,10 +294,6 @@ replacing the `__address__`. If we do not want to probe all services, we can spe
303294
304295
kubernetes_sd_configs:
305296
- role: service
306-
tls_config:
307-
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
308-
insecure_skip_verify: true
309-
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
310297
311298
relabel_configs:
312299
# Example relabel to probe only some services that have "prometheus.io/should_be_probed = true" annotation
@@ -356,10 +343,6 @@ As setup in `services`, this will also require the Blackbox Exporter.
356343
357344
kubernetes_sd_configs:
358345
- role: ingress
359-
tls_config:
360-
ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
361-
insecure_skip_verify: true
362-
bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
363346
364347
relabel_configs:
365348
# Example relabel to probe only some services that have "prometheus.io/should_be_probed = true" annotation
@@ -548,4 +531,4 @@ If you would like a more basic setup, please take a look at the
548531
[getting started with the AWS Distro for OpenTelemetry Collector-AMP Pipeline in EKS Guide](/docs/getting-started/prometheus-remote-write-exporter).
549532

550533
We would love to hear more common configuration scenarios or improvements to this documentation from you! Please submit an issue
551-
on the [aws-otel community](https://github.com/aws-observability/aws-otel-community) to let us know.
534+
on the [aws-otel community](https://github.com/aws-observability/aws-otel-community) to let us know.

0 commit comments

Comments
 (0)