Trying to configure mTLS in cortex prometheus data source but getting error - error creating http client: failed to parse TLS CA PEM certificate - error getting datasource info
Tested certificates with curl command and they are valid.
Below is the configuration
kind: GrafanaDatasource
metadata:
name: cortex
spec:
instanceSelector:
matchLabels:
grafana: rmagdum
datasource:
name: Cortex
type: prometheus
access: proxy
url: https://otel-cortex-nginx:8084/api/prom
isDefault: true
editable: false
jsonData:
cacheLevel: None
httpHeaderName1: X-Scope-OrgID
httpMethod: POST
prometheusType: Cortex
prometheusVersion: 1.14.0
timeInterval: 15s
secureJsonData:
httpHeaderValue1: rmagdum
tlsCACert: $__file{/etc/pki/client-certs/ca.crt}
tlsClientCert: $__file{/etc/pki/client-certs/tls.crt}
tlsClientKey: $__file{/etc/pki/client-certs/tls.key}