Sql exporter ssl problem with cratedb operator

Problem

The sql-exporter ConfigMap is generated from a bundled data/sql-exporter.yaml
with a hardcoded DSN:

data_source_name: "postgres://crate@localhost:5432/?connect_timeout=5"

There is no field in the CrateDB CR spec to inject connection parameters like
sslmode=disable. This causes the sql-exporter sidecar to fail on CrateDB
clusters that do not have SSL enabled on the PostgreSQL interface:

pq: SSL is not enabled on the server

Expected Behavior

The CrateDB CR should expose a field (e.g. spec.cluster.sqlExporter.sslMode
or spec.cluster.sqlExporter.connectionParams) that gets appended to the DSN
when the ConfigMap is generated in get_sql_exporter_config().

Environment

  • crate-operator version: crate/crate-operator:2.53.0

  • CrateDB version: 5.10.4

  • SSL enabled on cluster: No

1 Like

Seems someone (you?) already created a feature request at the `crate-operator` repository, thanks. Please follow on the issue for further input/progress.

1 Like