Prometheus charm expects ca_file
to be the file's text content instead of its path
#670
Labels
ca_file
to be the file's text content instead of its path
#670
Bug Description
When a metrics endpoint provider charm is integrated with prometheus charm, it can set a
tls_config
as part of its scrape job. This config can contain aca_file
key, which, according to the config spec , should contain the path of the CA cert not the actual contents of the CA. (that usecase is for another fieldca
)However, here, the prometheus charm is expecting the
ca_file
to hold the actual cert content.So, a charm providing a scrape job config would configure
ca_file
as per the upstream's definition, but would get unexpected results.Prometheus charm should fetch the
ca
key instead.To Reproduce
"tls_config":{"ca_file": "path/to/ca/cert"}
prometheus
overprometheus_scrape
interfacecat /etc/prometheus/prometheus.yaml
and grab the value ofca_file
in that scrape jobcat /filename/from/previous/step
and you'll find invalid cert contentsEnvironment
juju 3.6
microk8s 1.28
Relevant log output
Additional context
No response
The text was updated successfully, but these errors were encountered: