Skip to content

Commit 843b986

Browse files
authored
Merge pull request #81 from simonpasquier/document-scrape-class
Document scrape class in ServiceMonitor
2 parents fc5edaf + 46624a2 commit 843b986

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

content/Products/OpenshiftMonitoring/collecting_metrics.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -233,17 +233,16 @@ spec:
233233
port: metrics
234234
scheme: https
235235
tlsConfig:
236-
# The CA file used by Prometheus to verify the server's certificate.
237-
# It's the cluster's CA bundle from the service CA operator.
238-
caFile: /etc/prometheus/configmaps/serving-certs-ca-bundle/service-ca.crt
239236
# The name of the server (CN) in the server's certificate.
240237
serverName: my-app.openshift-example.svc
241-
# The client's certificate file used by Prometheus when scraping the metrics.
242-
# This file is located in the Prometheus container.
243-
certFile: /etc/prometheus/secrets/metrics-client-certs/tls.crt
244-
# The client's key file used by Prometheus when scraping the metrics.
245-
# This file is located in the Prometheus container.
246-
keyFile: /etc/prometheus/secrets/metrics-client-certs/tls.key
238+
# The openshift-monitoring/k8s resource declares a `tls-client-certificate-auth`
239+
# scrape class which defines the client certificate and key used by Prometheus
240+
# scrape the /metrics endpoint as well as the certificate authority used
241+
# used to verify the server's certificate (*). Referencing the scrape class here
242+
# avoids specifying the exact filepaths.
243+
#
244+
# (*) the certificate authority is the cluster's CA bundle from the service CA operator.
245+
scrapeClass: tls-client-certificate-auth
247246
selector:
248247
# Select all Services in the same namespace that have the `app.kubernetes.io/name: my-app` label.
249248
matchLabels:

0 commit comments

Comments
 (0)